leds: lp5521: Properly setup of_device_id table
Don't mix of_device_id entry in i2c_device_id table. Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Bryan Wu <cooloney@gmail.com>
This commit is contained in:
parent
e015050cc5
commit
b548a34ba4
1 changed files with 9 additions and 1 deletions
|
@ -490,14 +490,22 @@ static int lp5521_remove(struct i2c_client *client)
|
||||||
|
|
||||||
static const struct i2c_device_id lp5521_id[] = {
|
static const struct i2c_device_id lp5521_id[] = {
|
||||||
{ "lp5521", 0 }, /* Three channel chip */
|
{ "lp5521", 0 }, /* Three channel chip */
|
||||||
{ "national,lp5521", 0 }, /* OF compatible */
|
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(i2c, lp5521_id);
|
MODULE_DEVICE_TABLE(i2c, lp5521_id);
|
||||||
|
|
||||||
|
#ifdef CONFIG_OF
|
||||||
|
static const struct of_device_id of_lp5521_leds_match[] = {
|
||||||
|
{ .compatible = "national,lp5521", },
|
||||||
|
{},
|
||||||
|
};
|
||||||
|
|
||||||
|
MODULE_DEVICE_TABLE(of, of_lp5521_leds_match);
|
||||||
|
#endif
|
||||||
static struct i2c_driver lp5521_driver = {
|
static struct i2c_driver lp5521_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "lp5521",
|
.name = "lp5521",
|
||||||
|
.of_match_table = of_match_ptr(of_lp5521_leds_match),
|
||||||
},
|
},
|
||||||
.probe = lp5521_probe,
|
.probe = lp5521_probe,
|
||||||
.remove = lp5521_remove,
|
.remove = lp5521_remove,
|
||||||
|
|
Loading…
Add table
Reference in a new issue