summaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/hci_ldisc.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2007-05-09 09:15:35 +0200
committerDavid S. Miller <davem@sunset.davemloft.net>2007-05-10 23:45:04 -0700
commitd215874460e7657b8e104de024140e0932690450 (patch)
treef5384bd6f2a7d24bae282362c691a213221f51c8 /drivers/bluetooth/hci_ldisc.c
parent5be3946647424b08db0f62c545215cf506af8a52 (diff)
[Bluetooth] Add HCIUARTGETDEVICE support for HCI line discipline
Adding HCIUARTGETDEVICE makes it possible to get the HCI device number that is attached to a given serial device. This is required during the initialization process of some Bluetooth chips. Signed-off-by: Ohad Ben-Cohen <ohad@bencohen.org> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/hci_ldisc.c')
-rw-r--r--drivers/bluetooth/hci_ldisc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index 0f4203b499a..75c15085f81 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -479,6 +479,11 @@ static int hci_uart_tty_ioctl(struct tty_struct *tty, struct file * file,
return hu->proto->id;
return -EUNATCH;
+ case HCIUARTGETDEVICE:
+ if (test_bit(HCI_UART_PROTO_SET, &hu->flags))
+ return hu->hdev->id;
+ return -EUNATCH;
+
default:
err = n_tty_ioctl(tty, file, cmd, arg);
break;