diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2012-02-24 11:12:24 -0500 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-02-24 13:14:56 -0500 |
commit | a55e1f388767116836d32457a50eda7da3e925e5 (patch) | |
tree | af1e150006d5799ee3114ab78a7cf56af57d0256 /drivers/bluetooth/hci_ldisc.c | |
parent | 28b8df77449faa03b573638e089a855f8d25e0ed (diff) |
Bluetooth: Allow HCI UART reset parameter via flags ioctl
The flags ioctl for HCI UART drivers already allows setting of certain
Bluetooth core quirks. The reset parameter fits right in here. So allow
this as well.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'drivers/bluetooth/hci_ldisc.c')
-rw-r--r-- | drivers/bluetooth/hci_ldisc.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c index c2d637adb3ca..cdc3594f9901 100644 --- a/drivers/bluetooth/hci_ldisc.c +++ b/drivers/bluetooth/hci_ldisc.c | |||
@@ -48,8 +48,6 @@ | |||
48 | 48 | ||
49 | #define VERSION "2.2" | 49 | #define VERSION "2.2" |
50 | 50 | ||
51 | static bool reset = 0; | ||
52 | |||
53 | static struct hci_uart_proto *hup[HCI_UART_MAX_PROTO]; | 51 | static struct hci_uart_proto *hup[HCI_UART_MAX_PROTO]; |
54 | 52 | ||
55 | int hci_uart_register_proto(struct hci_uart_proto *p) | 53 | int hci_uart_register_proto(struct hci_uart_proto *p) |
@@ -392,12 +390,12 @@ static int hci_uart_register_dev(struct hci_uart *hu) | |||
392 | hdev->send = hci_uart_send_frame; | 390 | hdev->send = hci_uart_send_frame; |
393 | hdev->parent = hu->tty->dev; | 391 | hdev->parent = hu->tty->dev; |
394 | 392 | ||
395 | if (!reset) | ||
396 | set_bit(HCI_QUIRK_NO_RESET, &hdev->quirks); | ||
397 | |||
398 | if (test_bit(HCI_UART_RAW_DEVICE, &hu->hdev_flags)) | 393 | if (test_bit(HCI_UART_RAW_DEVICE, &hu->hdev_flags)) |
399 | set_bit(HCI_QUIRK_RAW_DEVICE, &hdev->quirks); | 394 | set_bit(HCI_QUIRK_RAW_DEVICE, &hdev->quirks); |
400 | 395 | ||
396 | if (!test_bit(HCI_UART_RESET_ON_INIT, &hu->hdev_flags)) | ||
397 | set_bit(HCI_QUIRK_NO_RESET, &hdev->quirks); | ||
398 | |||
401 | if (hci_register_dev(hdev) < 0) { | 399 | if (hci_register_dev(hdev) < 0) { |
402 | BT_ERR("Can't register HCI device"); | 400 | BT_ERR("Can't register HCI device"); |
403 | hci_free_dev(hdev); | 401 | hci_free_dev(hdev); |
@@ -584,9 +582,6 @@ static void __exit hci_uart_exit(void) | |||
584 | module_init(hci_uart_init); | 582 | module_init(hci_uart_init); |
585 | module_exit(hci_uart_exit); | 583 | module_exit(hci_uart_exit); |
586 | 584 | ||
587 | module_param(reset, bool, 0644); | ||
588 | MODULE_PARM_DESC(reset, "Send HCI reset command on initialization"); | ||
589 | |||
590 | MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>"); | 585 | MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>"); |
591 | MODULE_DESCRIPTION("Bluetooth HCI UART driver ver " VERSION); | 586 | MODULE_DESCRIPTION("Bluetooth HCI UART driver ver " VERSION); |
592 | MODULE_VERSION(VERSION); | 587 | MODULE_VERSION(VERSION); |