Skip to content

Commit

Permalink
leds-gpio: of: introduce MODULE_DEVICE_TABLE for module autoloading
Browse files Browse the repository at this point in the history
Enable autoloading of leds-gpio module when a corresponing DT entry is present.

Signed-off-by: Paolo Pisati <[email protected]>
Signed-off-by: Bryan Wu <[email protected]>
  • Loading branch information
piso77 authored and cooloney committed Mar 6, 2014
1 parent aad0f29 commit 472b854
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/leds/leds-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ static const struct of_device_id of_gpio_leds_match[] = {
{ .compatible = "gpio-leds", },
{},
};

MODULE_DEVICE_TABLE(of, of_gpio_leds_match);
#else /* CONFIG_OF_GPIO */
static struct gpio_leds_priv *gpio_leds_create_of(struct platform_device *pdev)
{
Expand Down

0 comments on commit 472b854

Please sign in to comment.