Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
leds-gpio-register.c File Reference
#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)
 

Function Documentation

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.