[alsa-devel] [PATCH] ASoC: rt5640: ifdef for ACPI module table

Olof Johansson olof at lixom.net
Wed Sep 18 20:44:18 CEST 2013

On Wed, Sep 18, 2013 at 11:34 AM, Mark Brown <broonie at kernel.org> wrote:
> On Wed, Sep 18, 2013 at 10:36:20AM -0700, Olof Johansson wrote:
>> On Wed, Sep 18, 2013 at 06:28:58PM +0100, Mark Brown wrote:
>> > I'd have expected the folks doing the allyesconfig builds to have
>> > complained then...
>> Allyes will probably turn on CONFIG_ACPI and thus reference the variable
>> in the struct device.
> Yeah, I was thinking of OF which isn't available on all architectures.
> Perhaps it is on every architecture people tend to do this stuff on
> though.
>> With the new of_match_ptr() and ACPI_PTR() you get rid of the
>> ifdef in struct device for those, but you still want it around
>> MODULE_DEVICE_TABLE() and the actual definition of the match table.
> Hrm, perhaps that was what was supposed to happen - have
> MODULE_DEVICE_TABLE() create the appropriate eliminateable static
> reference so the compiler can figure things out and we don't need the
> ifdefs.  It'd certainly be nice to elimiante more of these ifdefs.

Easiest way to do that is probably to provide a new macro to declare
the match tables with, that compiles out and/or gives appropriate
attributes depending on what is enabled or not in the config. That
gets rid of the ifdefs but we don't have anything like it today.

I'm honestly not sure I think it's needed, the ifdef for the table
doesn't bother me. But if people feel strongly about it then it's
likely the best way forward.


More information about the Alsa-devel mailing list