Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Sachin Kamat and committed by
Bryan Wu
fbd9df28 d67eb8e6

+2 -2
+2 -2
drivers/leds/leds-tca6507.c
··· 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) */ ··· 725 724 return ERR_PTR(-ENODEV); 726 725 } 727 726 728 - #define of_tca6507_leds_match NULL 729 727 #endif 730 728 731 729 static int tca6507_probe(struct i2c_client *client, ··· 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,