提交 b9f6940a 编写于 作者: J Jarkko Nikula 提交者: Mark Brown

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: NJarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 0eca7cf2
......@@ -1312,8 +1312,8 @@ pxa2xx_spi_acpi_get_pdata(struct platform_device *pdev)
const struct pci_device_id *pcidev_id = NULL;
int devid, type;
if (!ACPI_HANDLE(&pdev->dev) ||
acpi_bus_get_device(ACPI_HANDLE(&pdev->dev), &adev))
adev = ACPI_COMPANION(&pdev->dev);
if (!adev)
return NULL;
if (dev_is_pci(pdev->dev.parent))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册