diff options
author | Stephen Warren <swarren@nvidia.com> | 2011-12-06 22:15:41 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-12-07 14:51:04 +0100 |
commit | f18b4e2ee9649c4aa50cc279826d3890f468a80e (patch) | |
tree | ac2482465ec90307ff7618d93f7276fd427ff5fc /sound/soc/codecs/wm8903.c | |
parent | Merge branch 'for-3.2' into for-3.3 (diff) | |
download | linux-f18b4e2ee9649c4aa50cc279826d3890f468a80e.tar.xz linux-f18b4e2ee9649c4aa50cc279826d3890f468a80e.zip |
ASoC: WM8903: Add of_match_table
This allows the device to be matched against the device tree using the
compatible flag directly, as is standard, rather than falling back to
matching .id_table against the non-vendor portion of the first compatible
property value.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8903.c')
-rw-r--r-- | sound/soc/codecs/wm8903.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c index 21b9fdc18319..d88b727d7f99 100644 --- a/sound/soc/codecs/wm8903.c +++ b/sound/soc/codecs/wm8903.c @@ -2201,6 +2201,12 @@ static __devexit int wm8903_i2c_remove(struct i2c_client *client) return 0; } +static const struct of_device_id wm8903_of_match[] = { + { .compatible = "wlf,wm8903", }, + {}, +}; +MODULE_DEVICE_TABLE(of, wm8903_of_match); + static const struct i2c_device_id wm8903_i2c_id[] = { { "wm8903", 0 }, { } @@ -2211,6 +2217,7 @@ static struct i2c_driver wm8903_i2c_driver = { .driver = { .name = "wm8903", .owner = THIS_MODULE, + .of_match_table = wm8903_of_match, }, .probe = wm8903_i2c_probe, .remove = __devexit_p(wm8903_i2c_remove), |