aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorUwe Kleine-König <[email protected]>2011-05-24 17:13:29 -0700
committerLinus Torvalds <[email protected]>2011-05-25 08:39:51 -0700
commit4440673a95e63ad888a41db596edaa0c55d3a332 (patch)
treec548419177ab7b2db08bdb5fae3f62b39649d77b /include/linux
parent9b2da53f7627304cd4030cb4883908bfb1bce998 (diff)
leds: provide helper to register "leds-gpio" devices
This function makes a deep copy of the platform data to allow it to live in init memory. For a kernel that supports several machines and so includes the definition for several leds-gpio devices this saves quite some memory because all but one definition can be free'd after boot. As the function is used by arch code it must be builtin and so cannot go into leds-gpio.c. [[email protected]: s/CONFIG_LED_REGISTER_GPIO/CONFIG_LEDS_REGISTER_GPIO/] Signed-off-by: Uwe Kleine-König <[email protected]> Cc: Russell King <[email protected]> Acked-by: Richard Purdie <[email protected]> Cc: Fabio Estevam <[email protected]> Cc: Sascha Hauer <[email protected]> Tested-by: H Hartley Sweeten <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/leds.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/leds.h b/include/linux/leds.h
index 61e0340a4b77..5884def15a24 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -207,5 +207,7 @@ struct gpio_led_platform_data {
unsigned long *delay_off);
};
+struct platform_device *gpio_led_register_device(
+ int id, const struct gpio_led_platform_data *pdata);
#endif /* __LINUX_LEDS_H_INCLUDED */