Skip to content

Commit fbd9df2

Browse files
Sachin Kamatcooloney
authored andcommitted
leds: tca6507: Use of_match_ptr() macro
This eliminates having an #ifdef returning NULL for the case when OF is disabled. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Bryan Wu <cooloney@gmail.com>
1 parent d67eb8e commit fbd9df2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/leds/leds-tca6507.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
#include <linux/gpio.h>
8686
#include <linux/workqueue.h>
8787
#include <linux/leds-tca6507.h>
88+
#include <linux/of.h>
8889

8990
/* LED select registers determine the source that drives LED outputs */
9091
#define TCA6507_LS_LED_OFF 0x0 /* Output HI-Z (off) */
@@ -724,7 +725,6 @@ tca6507_led_dt_init(struct i2c_client *client)
724725
return ERR_PTR(-ENODEV);
725726
}
726727

727-
#define of_tca6507_leds_match NULL
728728
#endif
729729

730730
static int tca6507_probe(struct i2c_client *client,
@@ -813,7 +813,7 @@ static struct i2c_driver tca6507_driver = {
813813
.driver = {
814814
.name = "leds-tca6507",
815815
.owner = THIS_MODULE,
816-
.of_match_table = of_tca6507_leds_match,
816+
.of_match_table = of_match_ptr(of_tca6507_leds_match),
817817
},
818818
.probe = tca6507_probe,
819819
.remove = tca6507_remove,

0 commit comments

Comments
 (0)