summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/sdhci-acpi.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2017-07-24 17:59:58 +0300
committerUlf Hansson <ulf.hansson@linaro.org>2017-08-30 14:01:39 +0200
commitcd25c7be3cc6f5f349e57a0bd0fd056e7f3f8dbe (patch)
treef913610ad488fc39dfba24c20014296c8d14ee35 /drivers/mmc/host/sdhci-acpi.c
parent468c648335b1724fcaa0c4f2a0247f77fe4f2977 (diff)
downloadlinux-stable-cd25c7be3cc6f5f349e57a0bd0fd056e7f3f8dbe.tar.gz
linux-stable-cd25c7be3cc6f5f349e57a0bd0fd056e7f3f8dbe.tar.bz2
linux-stable-cd25c7be3cc6f5f349e57a0bd0fd056e7f3f8dbe.zip
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 <andriy.shevchenko@linux.intel.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/sdhci-acpi.c')
-rw-r--r--drivers/mmc/host/sdhci-acpi.c4
1 files changed, 2 insertions, 2 deletions
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);