diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-05-09 08:48:07 +0400 |
---|---|---|
committer | Bryan Wu <cooloney@gmail.com> | 2013-06-21 03:21:32 +0400 |
commit | b548a34ba47c1fd73316493c0690c8bf3111ff9d (patch) | |
tree | 4a86d4827ec673f51fb981aeb9f062cb6db59218 /drivers/leds/leds-lp5521.c | |
parent | e015050cc5ea01e4beba3862dcafef9360c77522 (diff) | |
download | linux-b548a34ba47c1fd73316493c0690c8bf3111ff9d.tar.xz |
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>
Diffstat (limited to 'drivers/leds/leds-lp5521.c')
-rw-r--r-- | drivers/leds/leds-lp5521.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c index d461e2664b09..1392feb1bcf7 100644 --- a/drivers/leds/leds-lp5521.c +++ b/drivers/leds/leds-lp5521.c @@ -490,14 +490,22 @@ static int lp5521_remove(struct i2c_client *client) static const struct i2c_device_id lp5521_id[] = { { "lp5521", 0 }, /* Three channel chip */ - { "national,lp5521", 0 }, /* OF compatible */ { } }; 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 = { .driver = { .name = "lp5521", + .of_match_table = of_match_ptr(of_lp5521_leds_match), }, .probe = lp5521_probe, .remove = lp5521_remove, |