summaryrefslogtreecommitdiff
path: root/drivers/bluetooth/hci_bcm.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2017-06-06 17:47:17 +0300
committerMarcel Holtmann <marcel@holtmann.org>2017-06-09 19:45:48 +0300
commitfda7057f4b5356d40d321f339f4ac6b3f94076ec (patch)
treec8c0fc707dfcb336c720522cff6207941f029735 /drivers/bluetooth/hci_bcm.c
parentb73f22695f4445114bd354df19ef84201ead22fe (diff)
downloadlinux-fda7057f4b5356d40d321f339f4ac6b3f94076ec.tar.xz
Bluetooth: hci_bcm: Switch to devm_acpi_dev_add_driver_gpios()
Switch to use managed variant of acpi_dev_add_driver_gpios() to simplify error path and fix potentially wrong assingment if ->probe() fails. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/hci_bcm.c')
-rw-r--r--drivers/bluetooth/hci_bcm.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c
index f87bfdfee4ff..e2096c7803b3 100644
--- a/drivers/bluetooth/hci_bcm.c
+++ b/drivers/bluetooth/hci_bcm.c
@@ -762,8 +762,7 @@ static int bcm_acpi_probe(struct bcm_device *dev)
if (id)
gpio_mapping = (const struct acpi_gpio_mapping *) id->driver_data;
- ret = acpi_dev_add_driver_gpios(ACPI_COMPANION(&pdev->dev),
- gpio_mapping);
+ ret = devm_acpi_dev_add_driver_gpios(&pdev->dev, gpio_mapping);
if (ret)
return ret;
@@ -834,8 +833,6 @@ static int bcm_remove(struct platform_device *pdev)
list_del(&dev->list);
mutex_unlock(&bcm_device_lock);
- acpi_dev_remove_driver_gpios(ACPI_COMPANION(&pdev->dev));
-
dev_info(&pdev->dev, "%s device unregistered.\n", dev->name);
return 0;