]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ASoC: tas2781: fix unused-const-variable warning
authorArnd Bergmann <arnd@arndb.de>
Mon, 13 Apr 2026 07:00:45 +0000 (09:00 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 13 Apr 2026 16:42:14 +0000 (17:42 +0100)
commitbc9b1ebaa7624edde54d4ae842d11cebb26db09b
tree9d449ff5cd2abfdb5d762d83c870dbc47832d23d
parent115e7d764dad66a10e150bd4b3ba3bbb95b04d85
ASoC: tas2781: fix unused-const-variable warning

When both CONFIG_OF and CONFIG_ACPI are disabled, the ID table is not
referenced any more:

sound/soc/codecs/tas2781-i2c.c:102:35: error: 'tasdevice_id' defined but not used [-Werror=unused-const-variable=]
  102 | static const struct i2c_device_id tasdevice_id[] = {
      |                                   ^~~~~~~~~~~~

Remove the #ifdef checks and just include the ID tables unconditionally
to get a clean build in all configurations. The code already uses
IS_ENABLED() checks for both to benefit from dead code elimination
and the ID tables are small enough that they can just be included
all the time.

Fixes: 9a52d1b7cb4a ("ASoC: tas2781: Explicit association of Device, Device Name, and Device ID")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20260413070059.3828364-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/tas2781-i2c.c