diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-03-14 06:09:49 -0400 |
---|---|---|
committer | Bryan Wu <cooloney@gmail.com> | 2013-04-01 14:04:50 -0400 |
commit | fbd9df28faeda17b1a9d3e9ab976e969be98d379 (patch) | |
tree | 87f7cd0bec9743a75dcd51c55f13675378920404 | |
parent | d67eb8e66c53dd2d26d294b49969f0c3101a5368 (diff) |
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>
-rw-r--r-- | drivers/leds/leds-tca6507.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/leds/leds-tca6507.c b/drivers/leds/leds-tca6507.c index 070ba0741b21..98fe021ba276 100644 --- a/drivers/leds/leds-tca6507.c +++ b/drivers/leds/leds-tca6507.c | |||
@@ -85,6 +85,7 @@ | |||
85 | #include <linux/gpio.h> | 85 | #include <linux/gpio.h> |
86 | #include <linux/workqueue.h> | 86 | #include <linux/workqueue.h> |
87 | #include <linux/leds-tca6507.h> | 87 | #include <linux/leds-tca6507.h> |
88 | #include <linux/of.h> | ||
88 | 89 | ||
89 | /* LED select registers determine the source that drives LED outputs */ | 90 | /* LED select registers determine the source that drives LED outputs */ |
90 | #define TCA6507_LS_LED_OFF 0x0 /* Output HI-Z (off) */ | 91 | #define TCA6507_LS_LED_OFF 0x0 /* Output HI-Z (off) */ |
@@ -724,7 +725,6 @@ tca6507_led_dt_init(struct i2c_client *client) | |||
724 | return ERR_PTR(-ENODEV); | 725 | return ERR_PTR(-ENODEV); |
725 | } | 726 | } |
726 | 727 | ||
727 | #define of_tca6507_leds_match NULL | ||
728 | #endif | 728 | #endif |
729 | 729 | ||
730 | static int tca6507_probe(struct i2c_client *client, | 730 | static int tca6507_probe(struct i2c_client *client, |
@@ -813,7 +813,7 @@ static struct i2c_driver tca6507_driver = { | |||
813 | .driver = { | 813 | .driver = { |
814 | .name = "leds-tca6507", | 814 | .name = "leds-tca6507", |
815 | .owner = THIS_MODULE, | 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 | .probe = tca6507_probe, | 818 | .probe = tca6507_probe, |
819 | .remove = tca6507_remove, | 819 | .remove = tca6507_remove, |