summaryrefslogtreecommitdiffstats
path: root/drivers/leds
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-05-08 21:49:37 -0700
committerBryan Wu <cooloney@gmail.com>2013-06-20 16:21:33 -0700
commit28720cff9feeb705a39f54c196bc529fb33d1542 (patch)
treea75b95e461c42c6450444f222d9697cad6ab6165 /drivers/leds
parent33c88b67f3b66d3a7203862d520b1d07ee0cecb6 (diff)
downloadop-kernel-dev-28720cff9feeb705a39f54c196bc529fb33d1542.zip
op-kernel-dev-28720cff9feeb705a39f54c196bc529fb33d1542.tar.gz
leds: lp5562: 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-lp5562.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/leds/leds-lp5562.c b/drivers/leds/leds-lp5562.c
index e53bcb8..cbd856d 100644
--- a/drivers/leds/leds-lp5562.c
+++ b/drivers/leds/leds-lp5562.c
@@ -587,14 +587,23 @@ static int lp5562_remove(struct i2c_client *client)
static const struct i2c_device_id lp5562_id[] = {
{ "lp5562", 0 },
- { "ti,lp5562", 0 }, /* OF compatible */
{ }
};
MODULE_DEVICE_TABLE(i2c, lp5562_id);
+#ifdef CONFIG_OF
+static const struct of_device_id of_lp5562_leds_match[] = {
+ { .compatible = "ti,lp5562", },
+ {},
+};
+
+MODULE_DEVICE_TABLE(of, of_lp5562_leds_match);
+#endif
+
static struct i2c_driver lp5562_driver = {
.driver = {
.name = "lp5562",
+ .of_match_table = of_match_ptr(of_lp5562_leds_match),
},
.probe = lp5562_probe,
.remove = lp5562_remove,
OpenPOWER on IntegriCloud