Commit fbd9df28faeda17b1a9d3e9ab976e969be98d379
Committed by
Bryan Wu
1 parent
d67eb8e66c
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
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>
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
drivers/leds/leds-tca6507.c
... | ... | @@ -85,6 +85,7 @@ |
85 | 85 | #include <linux/gpio.h> |
86 | 86 | #include <linux/workqueue.h> |
87 | 87 | #include <linux/leds-tca6507.h> |
88 | +#include <linux/of.h> | |
88 | 89 | |
89 | 90 | /* LED select registers determine the source that drives LED outputs */ |
90 | 91 | #define TCA6507_LS_LED_OFF 0x0 /* Output HI-Z (off) */ |
... | ... | @@ -724,7 +725,6 @@ |
724 | 725 | return ERR_PTR(-ENODEV); |
725 | 726 | } |
726 | 727 | |
727 | -#define of_tca6507_leds_match NULL | |
728 | 728 | #endif |
729 | 729 | |
730 | 730 | static int tca6507_probe(struct i2c_client *client, |
... | ... | @@ -813,7 +813,7 @@ |
813 | 813 | .driver = { |
814 | 814 | .name = "leds-tca6507", |
815 | 815 | .owner = THIS_MODULE, |
816 | - .of_match_table = of_tca6507_leds_match, | |
816 | + .of_match_table = of_match_ptr(of_tca6507_leds_match), | |
817 | 817 | }, |
818 | 818 | .probe = tca6507_probe, |
819 | 819 | .remove = tca6507_remove, |