[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 15:30:23 CEST 2013


On 10/25/2013 04:18 PM, Rafael J. Wysocki wrote:
> On Friday, October 25, 2013 03:55:29 PM Jarkko Nikula wrote:
>>
>> 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.
> Well, it should.  ACPI_HANDLE() translates to (NULL) if CONFIG_ACPI
> is not defined and that causes the check to become "if (NULL)" which
> should always be dropped by the compiler.
>
My very vague memory says the same. I don't know is this gcc version or 
flag dependent behavior. I got the build error from both i386 build 
using gcc 4.8.1 and arm build by using make ARCH=arm omap2plus_defconfig 
and gcc-4.7-arm-linux-gnueabi 4.7.2-4.
> Does providing a stub acpi_bus_get_device() for !CONFIG_ACPI actually help?
>
>
Hmm, not only. Referencing to dev field in struct acpi_device by 
dev_name(&adev->dev) here will fail too.

-- 
Jarkko


More information about the Alsa-devel mailing list