Re: [PATCH] i2c: ACPI: Replace acpi_bus_get_device()

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

 



On Tue, Feb 01, 2022 at 07:00:42PM +0100, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
> 
> Replace acpi_bus_get_device() that is going to be dropped with
> acpi_fetch_acpi_dev().
> 
> No intentional functional impact.

...

> +	if (!adev || i2c_acpi_get_info(adev, &info, adapter, NULL))

AFAICS the !adev check is redundant since acpi_device_enumerated() does it.

>  		return AE_OK;

...

> +	struct acpi_device *adev = acpi_fetch_acpi_dev(handle);
>  
> -	if (i2c_acpi_do_lookup(adev, lookup))
> +	if (!adev || i2c_acpi_do_lookup(adev, lookup))
>  		return AE_OK;

Here we need it indeed.
Dunno, if acpi_dev_ready_for_enumeration() can gain the check itself.


-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux