[alsa-devel] [PATCH 5/7] ASoC: ts3a227e: add acpi table
Pierre-Louis Bossart
pierre-louis.bossart at linux.intel.com
Fri Sep 8 15:30:37 CEST 2017
>> +#ifdef CONFIG_ACPI
>> +static struct acpi_device_id ts3a227e_acpi_match[] = {
>> + { "104C227E", 0 },
>> + {},
>> +};
>> +MODULE_DEVICE_TABLE(acpi, ts3a227e_acpi_match);
>> +#endif
>
> so this is not present for non ACPI system,... fine
>
>> +
>> static struct i2c_driver ts3a227e_driver = {
>> .driver = {
>> .name = "ts3a227e",
>> .pm = &ts3a227e_pm,
>> .of_match_table = of_match_ptr(ts3a227e_of_match),
>> + .acpi_match_table = ACPI_PTR(ts3a227e_acpi_match),
>
> but then this would give compiler error on those systems as .acpi_match_table is
> defined in driver core... can you compile this on non acpi and check
This is not any different from what is done for other codecs.
static struct i2c_driver rt5677_i2c_driver = {
.driver = {
.name = "rt5677",
.of_match_table = rt5677_of_match,
.acpi_match_table = ACPI_PTR(rt5677_acpi_match),
},
And the 0day checks did not report any issues, probably because the
pre-processor takes the table out when CONFIG_ACPI is not enabled:
#define ACPI_PTR(_ptr) (NULL)
so no change...
More information about the Alsa-devel
mailing list