aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-05-09 00:48:57 -0400
committerBryan Wu <cooloney@gmail.com>2013-06-20 19:21:33 -0400
commit33c88b67f3b66d3a7203862d520b1d07ee0cecb6 (patch)
treea48d79e6e7a46f66b6019691dd2c42305b17c9a0 /drivers/leds
parentb548a34ba47c1fd73316493c0690c8bf3111ff9d (diff)
leds: lp5523: 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')
-rw-r--r--drivers/leds/leds-lp5523.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/leds/leds-lp5523.c b/drivers/leds/leds-lp5523.c
index 365e9148e5e8..3979428f3100 100644
--- a/drivers/leds/leds-lp5523.c
+++ b/drivers/leds/leds-lp5523.c
@@ -503,15 +503,24 @@ static int lp5523_remove(struct i2c_client *client)
503static const struct i2c_device_id lp5523_id[] = { 503static const struct i2c_device_id lp5523_id[] = {
504 { "lp5523", LP5523 }, 504 { "lp5523", LP5523 },
505 { "lp55231", LP55231 }, 505 { "lp55231", LP55231 },
506 { "national,lp5523", 0 }, /* OF compatible */
507 { } 506 { }
508}; 507};
509 508
510MODULE_DEVICE_TABLE(i2c, lp5523_id); 509MODULE_DEVICE_TABLE(i2c, lp5523_id);
511 510
511#ifdef CONFIG_OF
512static const struct of_device_id of_lp5523_leds_match[] = {
513 { .compatible = "national,lp5523", },
514 {},
515};
516
517MODULE_DEVICE_TABLE(of, of_lp5523_leds_match);
518#endif
519
512static struct i2c_driver lp5523_driver = { 520static struct i2c_driver lp5523_driver = {
513 .driver = { 521 .driver = {
514 .name = "lp5523x", 522 .name = "lp5523x",
523 .of_match_table = of_match_ptr(of_lp5523_leds_match),
515 }, 524 },
516 .probe = lp5523_probe, 525 .probe = lp5523_probe,
517 .remove = lp5523_remove, 526 .remove = lp5523_remove,