From 6ebcebddffbf5c074e467c725aafbd21dfd46ed5 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Thu, 16 Aug 2012 18:35:36 +0800 Subject: [PATCH] leds: leds-gpio: use of_match_ptr() Instead of having to define the match table to NULL if CONFIG_OF isn't set, use the of_match_ptr() macro which will do this for us. Signed-off-by: Tobias Klauser Signed-off-by: Bryan Wu --- drivers/leds/leds-gpio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c index c032b2180340..4043f7732e57 100644 --- a/drivers/leds/leds-gpio.c +++ b/drivers/leds/leds-gpio.c @@ -228,7 +228,6 @@ static struct gpio_leds_priv * __devinit gpio_leds_create_of(struct platform_dev { return NULL; } -#define of_gpio_leds_match NULL #endif /* CONFIG_OF_GPIO */ @@ -287,7 +286,7 @@ static struct platform_driver gpio_led_driver = { .driver = { .name = "leds-gpio", .owner = THIS_MODULE, - .of_match_table = of_gpio_leds_match, + .of_match_table = of_match_ptr(of_gpio_leds_match), }, };