Commit bc9b1eb
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: 9a52d1b ("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>1 parent 115e7d7 commit bc9b1eb
1 file changed
Lines changed: 2 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
126 | 125 | | |
127 | 126 | | |
128 | 127 | | |
| |||
146 | 145 | | |
147 | 146 | | |
148 | 147 | | |
149 | | - | |
150 | 148 | | |
151 | 149 | | |
152 | 150 | | |
| |||
2083 | 2081 | | |
2084 | 2082 | | |
2085 | 2083 | | |
2086 | | - | |
2087 | 2084 | | |
2088 | 2085 | | |
2089 | 2086 | | |
| |||
2108 | 2105 | | |
2109 | 2106 | | |
2110 | 2107 | | |
2111 | | - | |
2112 | 2108 | | |
2113 | 2109 | | |
2114 | 2110 | | |
2115 | 2111 | | |
2116 | | - | |
2117 | | - | |
2118 | | - | |
2119 | | - | |
| 2112 | + | |
| 2113 | + | |
2120 | 2114 | | |
2121 | 2115 | | |
2122 | 2116 | | |
| |||
0 commit comments