diff options
-rw-r--r-- | drivers/leds/leds-lp5523.c | 11 |
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) | |||
503 | static const struct i2c_device_id lp5523_id[] = { | 503 | static 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 | ||
510 | MODULE_DEVICE_TABLE(i2c, lp5523_id); | 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 | static struct i2c_driver lp5523_driver = { | 520 | static 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, |