[PATCH 2/3] leds: lp5523: Properly setup of_device_id table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Don't mix of_device_id entry in i2c_device_id table.

Signed-off-by: Axel Lin <axel.lin@xxxxxxxxxx>
---
 drivers/leds/leds-lp5523.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/leds/leds-lp5523.c b/drivers/leds/leds-lp5523.c
index 365e914..3979428 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)
 static const struct i2c_device_id lp5523_id[] = {
 	{ "lp5523",  LP5523 },
 	{ "lp55231", LP55231 },
-	{ "national,lp5523", 0 }, /* OF compatible */
 	{ }
 };
 
 MODULE_DEVICE_TABLE(i2c, lp5523_id);
 
+#ifdef CONFIG_OF
+static const struct of_device_id of_lp5523_leds_match[] = {
+	{ .compatible = "national,lp5523", },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, of_lp5523_leds_match);
+#endif
+
 static struct i2c_driver lp5523_driver = {
 	.driver = {
 		.name	= "lp5523x",
+		.of_match_table = of_match_ptr(of_lp5523_leds_match),
 	},
 	.probe		= lp5523_probe,
 	.remove		= lp5523_remove,
-- 
1.8.1.2



--
To unsubscribe from this list: send the line "unsubscribe linux-leds" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux