Skip to content

Commit 3d590af

Browse files
PeterZhu789lag-linaro
authored andcommitted
leds: Remove redundant of_match_ptr()
The driver depends on CONFIG_OF, so it is not necessary to use of_match_ptr() here. We remove both CONFIG_OF and of_match_ptr() here. Signed-off-by: Zhu Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent 4aa8f7e commit 3d590af

File tree

6 files changed

+7
-14
lines changed

6 files changed

+7
-14
lines changed

drivers/leds/leds-an30259a.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ MODULE_DEVICE_TABLE(i2c, an30259a_id);
344344
static struct i2c_driver an30259a_driver = {
345345
.driver = {
346346
.name = "leds-an30259a",
347-
.of_match_table = of_match_ptr(an30259a_match_table),
347+
.of_match_table = an30259a_match_table,
348348
},
349349
.probe = an30259a_probe,
350350
.remove = an30259a_remove,

drivers/leds/leds-aw2013.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ MODULE_DEVICE_TABLE(of, aw2013_match_table);
420420
static struct i2c_driver aw2013_driver = {
421421
.driver = {
422422
.name = "leds-aw2013",
423-
.of_match_table = of_match_ptr(aw2013_match_table),
423+
.of_match_table = aw2013_match_table,
424424
},
425425
.probe = aw2013_probe,
426426
.remove = aw2013_remove,

drivers/leds/leds-lp5521.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -594,18 +594,17 @@ static const struct i2c_device_id lp5521_id[] = {
594594
};
595595
MODULE_DEVICE_TABLE(i2c, lp5521_id);
596596

597-
#ifdef CONFIG_OF
598597
static const struct of_device_id of_lp5521_leds_match[] = {
599598
{ .compatible = "national,lp5521", },
600599
{},
601600
};
602601

603602
MODULE_DEVICE_TABLE(of, of_lp5521_leds_match);
604-
#endif
603+
605604
static struct i2c_driver lp5521_driver = {
606605
.driver = {
607606
.name = "lp5521",
608-
.of_match_table = of_match_ptr(of_lp5521_leds_match),
607+
.of_match_table = of_lp5521_leds_match,
609608
},
610609
.probe = lp5521_probe,
611610
.remove = lp5521_remove,

drivers/leds/leds-lp5523.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -972,20 +972,18 @@ static const struct i2c_device_id lp5523_id[] = {
972972

973973
MODULE_DEVICE_TABLE(i2c, lp5523_id);
974974

975-
#ifdef CONFIG_OF
976975
static const struct of_device_id of_lp5523_leds_match[] = {
977976
{ .compatible = "national,lp5523", },
978977
{ .compatible = "ti,lp55231", },
979978
{},
980979
};
981980

982981
MODULE_DEVICE_TABLE(of, of_lp5523_leds_match);
983-
#endif
984982

985983
static struct i2c_driver lp5523_driver = {
986984
.driver = {
987985
.name = "lp5523x",
988-
.of_match_table = of_match_ptr(of_lp5523_leds_match),
986+
.of_match_table = of_lp5523_leds_match,
989987
},
990988
.probe = lp5523_probe,
991989
.remove = lp5523_remove,

drivers/leds/leds-lp5562.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -589,19 +589,17 @@ static const struct i2c_device_id lp5562_id[] = {
589589
};
590590
MODULE_DEVICE_TABLE(i2c, lp5562_id);
591591

592-
#ifdef CONFIG_OF
593592
static const struct of_device_id of_lp5562_leds_match[] = {
594593
{ .compatible = "ti,lp5562", },
595594
{},
596595
};
597596

598597
MODULE_DEVICE_TABLE(of, of_lp5562_leds_match);
599-
#endif
600598

601599
static struct i2c_driver lp5562_driver = {
602600
.driver = {
603601
.name = "lp5562",
604-
.of_match_table = of_match_ptr(of_lp5562_leds_match),
602+
.of_match_table = of_lp5562_leds_match,
605603
},
606604
.probe = lp5562_probe,
607605
.remove = lp5562_remove,

drivers/leds/leds-lp8501.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,19 +380,17 @@ static const struct i2c_device_id lp8501_id[] = {
380380
};
381381
MODULE_DEVICE_TABLE(i2c, lp8501_id);
382382

383-
#ifdef CONFIG_OF
384383
static const struct of_device_id of_lp8501_leds_match[] = {
385384
{ .compatible = "ti,lp8501", },
386385
{},
387386
};
388387

389388
MODULE_DEVICE_TABLE(of, of_lp8501_leds_match);
390-
#endif
391389

392390
static struct i2c_driver lp8501_driver = {
393391
.driver = {
394392
.name = "lp8501",
395-
.of_match_table = of_match_ptr(of_lp8501_leds_match),
393+
.of_match_table = of_lp8501_leds_match,
396394
},
397395
.probe = lp8501_probe,
398396
.remove = lp8501_remove,

0 commit comments

Comments
 (0)