aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/hci_intel.c
diff options
context:
space:
mode:
authorJarkko Nikula <jarkko.nikula@linux.intel.com>2015-09-30 09:28:52 -0400
committerMarcel Holtmann <marcel@holtmann.org>2015-10-01 02:55:42 -0400
commit23270e160dd5d240dbf73722c1df9ff3044d7bc9 (patch)
tree60af77b4318951a3cfbbaa8811f8652c8782c8f2 /drivers/bluetooth/hci_intel.c
parent4a2fa2b8a861b095f6d495dc006e9d47df177594 (diff)
Bluetooth: hci_intel: Cleanup the device probe code
There is some unneeded code in "hci_intel" probing. First acpi_match_device() call is needless as driver/platform/acpi core code has already done the matching before calling the probe and the driver does not use the returned pointer to matching _HID other than checking is it NULL. Then tree wide grep for "hci_intel" doesn't reveal that there is any code registering this platform device so it looks this device is always backed with ACPI companion so also ACPI_HANDLE() test can be removed. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/hci_intel.c')
-rw-r--r--drivers/bluetooth/hci_intel.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/drivers/bluetooth/hci_intel.c b/drivers/bluetooth/hci_intel.c
index 49e25409de67..2952107e3bae 100644
--- a/drivers/bluetooth/hci_intel.c
+++ b/drivers/bluetooth/hci_intel.c
@@ -1165,22 +1165,6 @@ static const struct acpi_device_id intel_acpi_match[] = {
1165 { }, 1165 { },
1166}; 1166};
1167MODULE_DEVICE_TABLE(acpi, intel_acpi_match); 1167MODULE_DEVICE_TABLE(acpi, intel_acpi_match);
1168
1169static int intel_acpi_probe(struct intel_device *idev)
1170{
1171 const struct acpi_device_id *id;
1172
1173 id = acpi_match_device(intel_acpi_match, &idev->pdev->dev);
1174 if (!id)
1175 return -ENODEV;
1176
1177 return 0;
1178}
1179#else
1180static int intel_acpi_probe(struct intel_device *idev)
1181{
1182 return -ENODEV;
1183}
1184#endif 1168#endif
1185 1169
1186#ifdef CONFIG_PM 1170#ifdef CONFIG_PM
@@ -1248,14 +1232,6 @@ static int intel_probe(struct platform_device *pdev)
1248 1232
1249 idev->pdev = pdev; 1233 idev->pdev = pdev;
1250 1234
1251 if (ACPI_HANDLE(&pdev->dev)) {
1252 int err = intel_acpi_probe(idev);
1253 if (err)
1254 return err;
1255 } else {
1256 return -ENODEV;
1257 }
1258
1259 idev->reset = devm_gpiod_get_optional(&pdev->dev, "reset", 1235 idev->reset = devm_gpiod_get_optional(&pdev->dev, "reset",
1260 GPIOD_OUT_LOW); 1236 GPIOD_OUT_LOW);
1261 if (IS_ERR(idev->reset)) { 1237 if (IS_ERR(idev->reset)) {