diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c index d3340dd..c553acf 100644 --- a/net/bluetooth/rfcomm/tty.c +++ b/net/bluetooth/rfcomm/tty.c @@ -205,6 +205,7 @@ static DEVICE_ATTR(channel, S_IRUGO, show_channel, NULL); static int rfcomm_dev_add(struct rfcomm_dev_req *req, struct rfcomm_dlc *dlc) { struct rfcomm_dev *dev; + struct device * hdev; struct list_head *head = &rfcomm_dev_list, *p; int err = 0; @@ -306,7 +307,12 @@ out: return err; } - dev->tty_dev = tty_register_device(rfcomm_tty_driver, dev->id, NULL); + hdev = rfcomm_get_device(dev); + + printk("HDEV : %p", hdev); + + dev->tty_dev = tty_register_device(rfcomm_tty_driver, dev->id, hdev); + //dev->tty_dev = tty_register_device(rfcomm_tty_driver, dev->id, NULL); if (IS_ERR(dev->tty_dev)) { err = PTR_ERR(dev->tty_dev);