Lines Matching refs:led
37 if (!data->led[0]) in picolcd_leds_set()
64 if (led_cdev != data->led[i]) in picolcd_led_set_brightness()
89 if (led_cdev == data->led[i]) { in picolcd_led_get_brightness()
99 struct led_classdev *led; in picolcd_init_leds() local
113 led = kzalloc(sizeof(struct led_classdev)+name_sz, GFP_KERNEL); in picolcd_init_leds()
114 if (!led) { in picolcd_init_leds()
119 name = (void *)(&led[1]); in picolcd_init_leds()
121 led->name = name; in picolcd_init_leds()
122 led->brightness = 0; in picolcd_init_leds()
123 led->max_brightness = 1; in picolcd_init_leds()
124 led->brightness_get = picolcd_led_get_brightness; in picolcd_init_leds()
125 led->brightness_set = picolcd_led_set_brightness; in picolcd_init_leds()
127 data->led[i] = led; in picolcd_init_leds()
128 ret = led_classdev_register(dev, data->led[i]); in picolcd_init_leds()
130 data->led[i] = NULL; in picolcd_init_leds()
131 kfree(led); in picolcd_init_leds()
139 if (data->led[i]) { in picolcd_init_leds()
140 led = data->led[i]; in picolcd_init_leds()
141 data->led[i] = NULL; in picolcd_init_leds()
142 led_classdev_unregister(led); in picolcd_init_leds()
143 kfree(led); in picolcd_init_leds()
150 struct led_classdev *led; in picolcd_exit_leds() local
154 led = data->led[i]; in picolcd_exit_leds()
155 data->led[i] = NULL; in picolcd_exit_leds()
156 if (!led) in picolcd_exit_leds()
158 led_classdev_unregister(led); in picolcd_exit_leds()
159 kfree(led); in picolcd_exit_leds()