Commit c31b0cb1f1a19bc551875e07e9dd7c531ac3580e
Committed by
Mark Brown
1 parent
e3efe3bedb
Exists in
master
and in
13 other branches
ASoC: alc5632: add an of_match table
Add a device tree match table. This serves to make the driver's support of device tree more explicit. Perhaps the fallback for DT matching to using the i2c_device_id table will go away one day, since it fails in face of devices from different vendors with the same name. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Showing 1 changed file with 7 additions and 0 deletions Side-by-side Diff
sound/soc/codecs/alc5632.c
... | ... | @@ -1190,11 +1190,18 @@ |
1190 | 1190 | }; |
1191 | 1191 | MODULE_DEVICE_TABLE(i2c, alc5632_i2c_table); |
1192 | 1192 | |
1193 | +static const struct of_device_id alc5632_of_match[] = { | |
1194 | + { .compatible = "realtek,alc5632", }, | |
1195 | + { } | |
1196 | +}; | |
1197 | +MODULE_DEVICE_TABLE(of, alc5632_of_match); | |
1198 | + | |
1193 | 1199 | /* i2c codec control layer */ |
1194 | 1200 | static struct i2c_driver alc5632_i2c_driver = { |
1195 | 1201 | .driver = { |
1196 | 1202 | .name = "alc5632", |
1197 | 1203 | .owner = THIS_MODULE, |
1204 | + .of_match_table = of_match_ptr(alc5632_of_match), | |
1198 | 1205 | }, |
1199 | 1206 | .probe = alc5632_i2c_probe, |
1200 | 1207 | .remove = alc5632_i2c_remove, |