Message ID | 1396291098-13796-3-git-send-email-swarren@wwwdotorg.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 2951f93f431a2fc8956a3b13882dc07cb5b8b2b9 |
Headers | show |
On Mon, Mar 31, 2014 at 12:38:18PM -0600, Stephen Warren wrote: > From: Stephen Warren <swarren@nvidia.com> > > 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. Applied, thanks.
diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c index 98c6e104357c..f7b0b37aa858 100644 --- a/sound/soc/codecs/max98090.c +++ b/sound/soc/codecs/max98090.c @@ -2399,11 +2399,18 @@ static const struct i2c_device_id max98090_i2c_id[] = { }; MODULE_DEVICE_TABLE(i2c, max98090_i2c_id); +static const struct of_device_id max98090_of_match[] = { + { .compatible = "maxim,max98090", }, + { } +}; +MODULE_DEVICE_TABLE(of, max98090_of_match); + static struct i2c_driver max98090_i2c_driver = { .driver = { .name = "max98090", .owner = THIS_MODULE, .pm = &max98090_pm, + .of_match_table = of_match_ptr(max98090_of_match), }, .probe = max98090_i2c_probe, .remove = max98090_i2c_remove,