From: Andy Shevchenko Date: Mon, 24 Jul 2017 14:59:58 +0000 (+0300) Subject: sdhci: acpi: Use new method to get ACPI companion X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cd25c7be3cc6f5f349e57a0bd0fd056e7f3f8dbe;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git sdhci: acpi: Use new method to get ACPI companion ACPI_COMPANION() macro reduces a code to get a companion device out of struct device. Use it instead of an old method. Signed-off-by: Andy Shevchenko Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson --- diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c index 2b1df889d041..08ae0ff13513 100644 --- a/drivers/mmc/host/sdhci-acpi.c +++ b/drivers/mmc/host/sdhci-acpi.c @@ -429,7 +429,6 @@ static const struct sdhci_acpi_slot *sdhci_acpi_get_slot(const char *hid, static int sdhci_acpi_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - acpi_handle handle = ACPI_HANDLE(dev); struct acpi_device *device, *child; struct sdhci_acpi_host *c; struct sdhci_host *host; @@ -439,7 +438,8 @@ static int sdhci_acpi_probe(struct platform_device *pdev) const char *uid; int err; - if (acpi_bus_get_device(handle, &device)) + device = ACPI_COMPANION(dev); + if (!device) return -ENODEV; hid = acpi_device_hid(device);