summaryrefslogtreecommitdiff
path: root/drivers/bluetooth/hci_ll.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2018-05-27 22:04:52 +0300
committerMarcel Holtmann <marcel@holtmann.org>2018-05-30 09:47:42 +0300
commite9ca08074ddcdcc3abacbfca888dba3a110e4453 (patch)
tree8f7a3c087c647e3600d5b62bc98b15786e60e0bd /drivers/bluetooth/hci_ll.c
parent412fe29ffcf9a1ba9f125e72ee3da957cd6a0064 (diff)
downloadlinux-e9ca08074ddcdcc3abacbfca888dba3a110e4453.tar.xz
Bluetooth: hci_serdev: Move serdev_device_close/open into common hci_serdev code
Make hci_uart_register_device() and hci_uart_unregister_device() call serdev_device_close()/open() themselves instead of relying on the various hci_uart drivers to do this for them. Besides reducing code complexity, this also ensures correct error checking of serdev_device_open(), which was missing in a few drivers. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/hci_ll.c')
-rw-r--r--drivers/bluetooth/hci_ll.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/bluetooth/hci_ll.c b/drivers/bluetooth/hci_ll.c
index 27e414b4e3a2..3e767f245ed5 100644
--- a/drivers/bluetooth/hci_ll.c
+++ b/drivers/bluetooth/hci_ll.c
@@ -141,7 +141,6 @@ static int ll_open(struct hci_uart *hu)
if (hu->serdev) {
struct ll_device *lldev = serdev_device_get_drvdata(hu->serdev);
- serdev_device_open(hu->serdev);
if (!IS_ERR(lldev->ext_clk))
clk_prepare_enable(lldev->ext_clk);
}
@@ -179,8 +178,6 @@ static int ll_close(struct hci_uart *hu)
gpiod_set_value_cansleep(lldev->enable_gpio, 0);
clk_disable_unprepare(lldev->ext_clk);
-
- serdev_device_close(hu->serdev);
}
hu->priv = NULL;