Linux Kernel
3.7.1
|
#include <linux/err.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/leds.h>
Go to the source code of this file.
Functions | |
struct platform_device *__init | gpio_led_register_device (int id, const struct gpio_led_platform_data *pdata) |
|
read |
gpio_led_register_device - register a gpio-led device : the platform data used for the new device
Makes a copy of pdata and pdata->leds and registers a new leds-gpio device with the result. This allows to have pdata and pdata-leds in .init.rodata and so saves some bytes compared to a static struct platform_device with static platform data.
Returns the registered device or an error pointer.
Definition at line 25 of file leds-gpio-register.c.