Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Axel Lin and committed by
Bryan Wu
28720cff 33c88b67

+10 -1
+10 -1
drivers/leds/leds-lp5562.c
··· 587 587 588 588 static const struct i2c_device_id lp5562_id[] = { 589 589 { "lp5562", 0 }, 590 - { "ti,lp5562", 0 }, /* OF compatible */ 591 590 { } 592 591 }; 593 592 MODULE_DEVICE_TABLE(i2c, lp5562_id); 594 593 594 + #ifdef CONFIG_OF 595 + static const struct of_device_id of_lp5562_leds_match[] = { 596 + { .compatible = "ti,lp5562", }, 597 + {}, 598 + }; 599 + 600 + MODULE_DEVICE_TABLE(of, of_lp5562_leds_match); 601 + #endif 602 + 595 603 static struct i2c_driver lp5562_driver = { 596 604 .driver = { 597 605 .name = "lp5562", 606 + .of_match_table = of_match_ptr(of_lp5562_leds_match), 598 607 }, 599 608 .probe = lp5562_probe, 600 609 .remove = lp5562_remove,