diff options
author | Jarkko Nikula <jarkko.nikula@linux.intel.com> | 2015-09-30 16:26:45 +0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-10-01 10:03:38 +0200 |
commit | e98d6d6203552ebd1e80ac17de857547efa37fba (patch) | |
tree | e83576efcfeeb5ee15a5451b51616c670d3144d0 /drivers/bluetooth | |
parent | 4d1c4558028ff0b7dbc1e24c319f478658f0620d (diff) |
Bluetooth: hci_bcm: Do not test ACPI companion in bcm_acpi_probe()
This device has always ACPI companion because driver supports only ACPI
enumeration. Therefore there is no need to test it in bcm_acpi_probe() and
we can pass it directly to acpi_dev_get_resources() (which will return
-EINVAL in case of NULL argument is passed).
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r-- | drivers/bluetooth/hci_bcm.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c index 967d16692925..512873262055 100644 --- a/drivers/bluetooth/hci_bcm.c +++ b/drivers/bluetooth/hci_bcm.c @@ -647,7 +647,6 @@ static int bcm_resource(struct acpi_resource *ares, void *data) static int bcm_acpi_probe(struct bcm_device *dev) { struct platform_device *pdev = dev->pdev; - struct acpi_device *adev; LIST_HEAD(resources); const struct dmi_system_id *dmi_id; int ret; @@ -696,11 +695,8 @@ static int bcm_acpi_probe(struct bcm_device *dev) } /* Retrieve UART ACPI info */ - adev = ACPI_COMPANION(&dev->pdev->dev); - if (!adev) - return 0; - - ret = acpi_dev_get_resources(adev, &resources, bcm_resource, dev); + ret = acpi_dev_get_resources(ACPI_COMPANION(&dev->pdev->dev), + &resources, bcm_resource, dev); if (ret < 0) return ret; acpi_dev_free_resource_list(&resources); |