Commit 33c88b67f3b66d3a7203862d520b1d07ee0cecb6

Authored by Axel Lin
Committed by Bryan Wu
1 parent b548a34ba4

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>

Showing 1 changed file with 10 additions and 1 deletions Side-by-side Diff

drivers/leds/leds-lp5523.c
... ... @@ -503,15 +503,24 @@
503 503 static const struct i2c_device_id lp5523_id[] = {
504 504 { "lp5523", LP5523 },
505 505 { "lp55231", LP55231 },
506   - { "national,lp5523", 0 }, /* OF compatible */
507 506 { }
508 507 };
509 508  
510 509 MODULE_DEVICE_TABLE(i2c, lp5523_id);
511 510  
  511 +#ifdef CONFIG_OF
  512 +static const struct of_device_id of_lp5523_leds_match[] = {
  513 + { .compatible = "national,lp5523", },
  514 + {},
  515 +};
  516 +
  517 +MODULE_DEVICE_TABLE(of, of_lp5523_leds_match);
  518 +#endif
  519 +
512 520 static struct i2c_driver lp5523_driver = {
513 521 .driver = {
514 522 .name = "lp5523x",
  523 + .of_match_table = of_match_ptr(of_lp5523_leds_match),
515 524 },
516 525 .probe = lp5523_probe,
517 526 .remove = lp5523_remove,