Bluetooth: hci_bcm: Remove needless acpi_match_device() call
authorJarkko Nikula <jarkko.nikula@linux.intel.com>
Wed, 30 Sep 2015 13:26:43 +0000 (16:26 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 1 Oct 2015 08:03:37 +0000 (10:03 +0200)
There is no need to call acpi_match_device() in driver's probe path and
verify does it find a match to given ACPI _HIDs in .acpi_match_table as
driver/platform/acpi core code has found the match prior calling the probe.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/hci_bcm.c

index 5375c9c04fdae9db9d71801a772efd8449d902a4..a1b9bbcbcb792c751c97284e042647c184572d29 100644 (file)
@@ -647,16 +647,11 @@ 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;
-       const struct acpi_device_id *id;
        struct acpi_device *adev;
        LIST_HEAD(resources);
        const struct dmi_system_id *dmi_id;
        int ret;
 
-       id = acpi_match_device(pdev->dev.driver->acpi_match_table, &pdev->dev);
-       if (!id)
-               return -ENODEV;
-
        /* Retrieve GPIO data */
        dev->name = dev_name(&pdev->dev);
        ret = acpi_dev_add_driver_gpios(ACPI_COMPANION(&pdev->dev),