Lines 36-41
Link Here
|
36 |
#include <linux/capability.h> |
36 |
#include <linux/capability.h> |
37 |
#include <linux/slab.h> |
37 |
#include <linux/slab.h> |
38 |
#include <linux/skbuff.h> |
38 |
#include <linux/skbuff.h> |
|
|
39 |
#include <linux/err.h> |
39 |
|
40 |
|
40 |
#include <net/bluetooth/bluetooth.h> |
41 |
#include <net/bluetooth/bluetooth.h> |
41 |
#include <net/bluetooth/hci_core.h> |
42 |
#include <net/bluetooth/hci_core.h> |
Lines 182-187
static int rfcomm_dev_add(struct rfcomm_
Link Here
|
182 |
{ |
183 |
{ |
183 |
struct rfcomm_dev *dev; |
184 |
struct rfcomm_dev *dev; |
184 |
struct list_head *head = &rfcomm_dev_list, *p; |
185 |
struct list_head *head = &rfcomm_dev_list, *p; |
|
|
186 |
struct class_device *class; |
185 |
int err = 0; |
187 |
int err = 0; |
186 |
|
188 |
|
187 |
BT_DBG("id %d channel %d", req->dev_id, req->channel); |
189 |
BT_DBG("id %d channel %d", req->dev_id, req->channel); |
Lines 261-267
out:
Link Here
|
261 |
return err; |
263 |
return err; |
262 |
} |
264 |
} |
263 |
|
265 |
|
264 |
tty_register_device(rfcomm_tty_driver, dev->id, rfcomm_get_device(dev)); |
266 |
class = tty_register_device(rfcomm_tty_driver, dev->id, rfcomm_get_device(dev)); |
|
|
267 |
if (IS_ERR(class)) |
268 |
printk("rfcomm_dev_add error %d\n", PTR_ERR(class)); |
269 |
else |
270 |
printk("rfcomm_dev_add succeeded\n"); |
265 |
|
271 |
|
266 |
return dev->id; |
272 |
return dev->id; |
267 |
} |
273 |
} |