[alsa-devel] [RFC 1/2] i2c: Use stable dev_name for ACPI enumerated I2C slaves
Jarkko Nikula
jarkko.nikula at linux.intel.com
Fri Oct 25 14:55:29 CEST 2013
Hi
On 10/25/2013 03:52 PM, Rafael J. Wysocki wrote:
>
> +static void i2c_dev_set_name(struct i2c_adapter *adap,
> + struct i2c_client *client)
> +{
> +#if IS_ENABLED(CONFIG_ACPI)
> + if (ACPI_HANDLE(&client->dev)) {
> ACPI_HANDLE() already contains an "is CONFIG_ACPI enabled?" check, so the #if
> around the if (ACPI_HANDLE()) {} is redundant.
>
> Similarly for the SPI patch.
>
Well, acpi_bus_get_device() is not available for non-ACPI builds and at
least the gcc I used for test build didn't optimize that block away.
--
Jarkko
More information about the Alsa-devel
mailing list