aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-pxa2xx.c
diff options
context:
space:
mode:
authorJarkko Nikula <jarkko.nikula@linux.intel.com>2015-09-25 03:27:18 -0400
committerMark Brown <broonie@kernel.org>2015-09-25 12:52:19 -0400
commitb9f6940a437dcb8481df16b175359e126cf7bc33 (patch)
tree2a9b0e36fb6e83a5ddee7075eb849c5d04be04af /drivers/spi/spi-pxa2xx.c
parent0eca7cf2696506006463b9d67bb6110c82d3e064 (diff)
spi: pxa2xx: Use ACPI_COMPANION() instead of acpi_bus_get_device()
Get pointer to the struct acpi_device by using ACPI_COMPANION() macro. This is more efficient than using ACPI_HANDLE() and acpi_bus_get_device(). Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-pxa2xx.c')
-rw-r--r--drivers/spi/spi-pxa2xx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index 0e075db589ca..aed9aabec14f 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -1312,8 +1312,8 @@ pxa2xx_spi_acpi_get_pdata(struct platform_device *pdev)
1312 const struct pci_device_id *pcidev_id = NULL; 1312 const struct pci_device_id *pcidev_id = NULL;
1313 int devid, type; 1313 int devid, type;
1314 1314
1315 if (!ACPI_HANDLE(&pdev->dev) || 1315 adev = ACPI_COMPANION(&pdev->dev);
1316 acpi_bus_get_device(ACPI_HANDLE(&pdev->dev), &adev)) 1316 if (!adev)
1317 return NULL; 1317 return NULL;
1318 1318
1319 if (dev_is_pci(pdev->dev.parent)) 1319 if (dev_is_pci(pdev->dev.parent))