Lines Matching refs:drv_data
142 struct steelseries_srws1_data *drv_data = hid_get_drvdata(hid); in steelseries_srws1_led_all_set_brightness() local
144 if (!drv_data) { in steelseries_srws1_led_all_set_brightness()
150 drv_data->led_state = 0; in steelseries_srws1_led_all_set_brightness()
152 drv_data->led_state = (1 << (SRWS1_NUMBER_LEDS + 1)) - 1; in steelseries_srws1_led_all_set_brightness()
154 steelseries_srws1_set_leds(hid, drv_data->led_state); in steelseries_srws1_led_all_set_brightness()
161 struct steelseries_srws1_data *drv_data; in steelseries_srws1_led_all_get_brightness() local
163 drv_data = hid_get_drvdata(hid); in steelseries_srws1_led_all_get_brightness()
165 if (!drv_data) { in steelseries_srws1_led_all_get_brightness()
170 return (drv_data->led_state >> SRWS1_NUMBER_LEDS) ? LED_FULL : LED_OFF; in steelseries_srws1_led_all_get_brightness()
178 struct steelseries_srws1_data *drv_data = hid_get_drvdata(hid); in steelseries_srws1_led_set_brightness() local
181 if (!drv_data) { in steelseries_srws1_led_set_brightness()
187 if (led_cdev != drv_data->led[i]) in steelseries_srws1_led_set_brightness()
190 state = (drv_data->led_state >> i) & 1; in steelseries_srws1_led_set_brightness()
192 drv_data->led_state &= ~(1 << i); in steelseries_srws1_led_set_brightness()
193 steelseries_srws1_set_leds(hid, drv_data->led_state); in steelseries_srws1_led_set_brightness()
195 drv_data->led_state |= 1 << i; in steelseries_srws1_led_set_brightness()
196 steelseries_srws1_set_leds(hid, drv_data->led_state); in steelseries_srws1_led_set_brightness()
206 struct steelseries_srws1_data *drv_data; in steelseries_srws1_led_get_brightness() local
209 drv_data = hid_get_drvdata(hid); in steelseries_srws1_led_get_brightness()
211 if (!drv_data) { in steelseries_srws1_led_get_brightness()
217 if (led_cdev == drv_data->led[i]) { in steelseries_srws1_led_get_brightness()
218 value = (drv_data->led_state >> i) & 1; in steelseries_srws1_led_get_brightness()
233 struct steelseries_srws1_data *drv_data = kzalloc(sizeof(*drv_data), GFP_KERNEL); in steelseries_srws1_probe() local
235 if (drv_data == NULL) { in steelseries_srws1_probe()
240 hid_set_drvdata(hdev, drv_data); in steelseries_srws1_probe()
260 drv_data->led_state = 0; in steelseries_srws1_probe()
262 drv_data->led[i] = NULL; in steelseries_srws1_probe()
283 drv_data->led[SRWS1_NUMBER_LEDS] = led; in steelseries_srws1_probe()
304 drv_data->led[i] = led; in steelseries_srws1_probe()
312 led = drv_data->led[i]; in steelseries_srws1_probe()
313 drv_data->led[i] = NULL; in steelseries_srws1_probe()
325 kfree(drv_data); in steelseries_srws1_probe()
334 struct steelseries_srws1_data *drv_data = hid_get_drvdata(hdev); in steelseries_srws1_remove() local
336 if (drv_data) { in steelseries_srws1_remove()
339 led = drv_data->led[i]; in steelseries_srws1_remove()
340 drv_data->led[i] = NULL; in steelseries_srws1_remove()
350 kfree(drv_data); in steelseries_srws1_remove()