Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33c88b67 authored by Axel Lin's avatar Axel Lin Committed by Bryan Wu
Browse files

leds: lp5523: Properly setup of_device_id table



Don't mix of_device_id entry in i2c_device_id table.

Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarBryan Wu <cooloney@gmail.com>
parent b548a34b
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -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,