Commit 2951f93f431a2fc8956a3b13882dc07cb5b8b2b9
Committed by
Mark Brown
1 parent
e585ca342d
Exists in
master
and in
13 other branches
ASoC: max98090: 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/max98090.c
... | ... | @@ -2406,11 +2406,18 @@ |
2406 | 2406 | }; |
2407 | 2407 | MODULE_DEVICE_TABLE(i2c, max98090_i2c_id); |
2408 | 2408 | |
2409 | +static const struct of_device_id max98090_of_match[] = { | |
2410 | + { .compatible = "maxim,max98090", }, | |
2411 | + { } | |
2412 | +}; | |
2413 | +MODULE_DEVICE_TABLE(of, max98090_of_match); | |
2414 | + | |
2409 | 2415 | static struct i2c_driver max98090_i2c_driver = { |
2410 | 2416 | .driver = { |
2411 | 2417 | .name = "max98090", |
2412 | 2418 | .owner = THIS_MODULE, |
2413 | 2419 | .pm = &max98090_pm, |
2420 | + .of_match_table = of_match_ptr(max98090_of_match), | |
2414 | 2421 | }, |
2415 | 2422 | .probe = max98090_i2c_probe, |
2416 | 2423 | .remove = max98090_i2c_remove, |