Skip to content

Commit

Permalink
leds: leds-gpio: use of_match_ptr()
Browse files Browse the repository at this point in the history
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 <tklauser@distanz.ch>
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
  • Loading branch information
Tobias Klauser authored and Bryan Wu committed Sep 11, 2012
1 parent d23a22a commit 6ebcebd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/leds/leds-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */


Expand Down Expand Up @@ -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),
},
};

Expand Down

0 comments on commit 6ebcebd

Please sign in to comment.