Lines Matching refs:led
50 struct ebsa285_led *led = container_of(cdev, in ebsa285_led_set() local
54 hw_led_state |= led->mask; in ebsa285_led_set()
56 hw_led_state &= ~led->mask; in ebsa285_led_set()
62 struct ebsa285_led *led = container_of(cdev, in ebsa285_led_get() local
65 return hw_led_state & led->mask ? LED_OFF : LED_FULL; in ebsa285_led_get()
84 struct ebsa285_led *led; in ebsa285_leds_init() local
86 led = kzalloc(sizeof(*led), GFP_KERNEL); in ebsa285_leds_init()
87 if (!led) in ebsa285_leds_init()
90 led->cdev.name = ebsa285_leds[i].name; in ebsa285_leds_init()
91 led->cdev.brightness_set = ebsa285_led_set; in ebsa285_leds_init()
92 led->cdev.brightness_get = ebsa285_led_get; in ebsa285_leds_init()
93 led->cdev.default_trigger = ebsa285_leds[i].trigger; in ebsa285_leds_init()
94 led->mask = BIT(i); in ebsa285_leds_init()
96 if (led_classdev_register(NULL, &led->cdev) < 0) { in ebsa285_leds_init()
97 kfree(led); in ebsa285_leds_init()