Re: [PATCH v1] sdhci: acpi: Use new method to get ACPI companion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>

Acked-by: Adrian Hunter <adrian.hunter@xxxxxxxxx>

> ---
>  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);
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux