* [PATCH v1] sdhci: acpi: Use new method to get ACPI companion
@ 2017-07-24 14:59 Andy Shevchenko
2017-07-25 6:56 ` Adrian Hunter
2017-07-27 14:49 ` Ulf Hansson
0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2017-07-24 14:59 UTC (permalink / raw)
To: Adrian Hunter, linux-mmc, Ulf Hansson; +Cc: Andy Shevchenko
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>
---
drivers/mmc/host/sdhci-acpi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c
index ac678e9fb19a..4bbce8919c30 100644
--- a/drivers/mmc/host/sdhci-acpi.c
+++ b/drivers/mmc/host/sdhci-acpi.c
@@ -432,7 +432,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;
@@ -442,7 +441,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);
--
2.13.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1] sdhci: acpi: Use new method to get ACPI companion
2017-07-24 14:59 [PATCH v1] sdhci: acpi: Use new method to get ACPI companion Andy Shevchenko
@ 2017-07-25 6:56 ` Adrian Hunter
2017-07-27 14:49 ` Ulf Hansson
1 sibling, 0 replies; 3+ messages in thread
From: Adrian Hunter @ 2017-07-25 6:56 UTC (permalink / raw)
To: Andy Shevchenko, linux-mmc, Ulf Hansson
On 24/07/17 17:59, Andy Shevchenko wrote:
> 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>
> ---
> drivers/mmc/host/sdhci-acpi.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c
> index ac678e9fb19a..4bbce8919c30 100644
> --- a/drivers/mmc/host/sdhci-acpi.c
> +++ b/drivers/mmc/host/sdhci-acpi.c
> @@ -432,7 +432,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;
> @@ -442,7 +441,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);
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] sdhci: acpi: Use new method to get ACPI companion
2017-07-24 14:59 [PATCH v1] sdhci: acpi: Use new method to get ACPI companion Andy Shevchenko
2017-07-25 6:56 ` Adrian Hunter
@ 2017-07-27 14:49 ` Ulf Hansson
1 sibling, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2017-07-27 14:49 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: Adrian Hunter, linux-mmc@vger.kernel.org
On 24 July 2017 at 16:59, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> 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>
Thanks, applied for next!
Kind regards
Uffe
> ---
> drivers/mmc/host/sdhci-acpi.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c
> index ac678e9fb19a..4bbce8919c30 100644
> --- a/drivers/mmc/host/sdhci-acpi.c
> +++ b/drivers/mmc/host/sdhci-acpi.c
> @@ -432,7 +432,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;
> @@ -442,7 +441,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);
> --
> 2.13.2
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-07-27 14:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-24 14:59 [PATCH v1] sdhci: acpi: Use new method to get ACPI companion Andy Shevchenko
2017-07-25 6:56 ` Adrian Hunter
2017-07-27 14:49 ` Ulf Hansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox