Skip to content

Commit

Permalink
ASoC: tlv320aic23: add an of_match table
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stephen Warren authored and Mark Brown committed Apr 1, 2014
1 parent 051389e commit 3534b84
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sound/soc/codecs/tlv320aic23-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,16 @@ static const struct i2c_device_id tlv320aic23_id[] = {

MODULE_DEVICE_TABLE(i2c, tlv320aic23_id);

static const struct of_device_id tlv320aic23_of_match[] = {
{ .compatible = "ti,tlv320aic23", },
{ }
};
MODULE_DEVICE_TABLE(of, tlv320aic23_of_match);

static struct i2c_driver tlv320aic23_i2c_driver = {
.driver = {
.name = "tlv320aic23-codec",
.of_match_table = of_match_ptr(tlv320aic23_of_match),
},
.probe = tlv320aic23_i2c_probe,
.remove = __exit_p(tlv320aic23_i2c_remove),
Expand Down

0 comments on commit 3534b84

Please sign in to comment.