Commit 28720cff9feeb705a39f54c196bc529fb33d1542
Committed by
Bryan Wu
1 parent
33c88b67f3
Exists in
smarc-imx_3.14.28_1.0.0_ga
and in
1 other branch
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>
Showing 1 changed file with 10 additions and 1 deletions Side-by-side Diff
drivers/leds/leds-lp5562.c
... | ... | @@ -587,14 +587,23 @@ |
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, |