Lines Matching refs:k90
42 struct k90_drvdata *k90; member
470 struct k90_drvdata *k90; in k90_init_macro_functions() local
474 k90 = kzalloc(sizeof(struct k90_drvdata), GFP_KERNEL); in k90_init_macro_functions()
475 if (!k90) { in k90_init_macro_functions()
479 drvdata->k90 = k90; in k90_init_macro_functions()
490 k90->record_led.removed = false; in k90_init_macro_functions()
491 k90->record_led.cdev.name = name; in k90_init_macro_functions()
492 k90->record_led.cdev.max_brightness = 1; in k90_init_macro_functions()
493 k90->record_led.cdev.brightness_set = k90_brightness_set; in k90_init_macro_functions()
494 k90->record_led.cdev.brightness_get = k90_record_led_get; in k90_init_macro_functions()
495 INIT_WORK(&k90->record_led.work, k90_record_led_work); in k90_init_macro_functions()
496 k90->record_led.brightness = 0; in k90_init_macro_functions()
497 ret = led_classdev_register(&dev->dev, &k90->record_led.cdev); in k90_init_macro_functions()
509 k90->record_led.removed = true; in k90_init_macro_functions()
510 led_classdev_unregister(&k90->record_led.cdev); in k90_init_macro_functions()
511 cancel_work_sync(&k90->record_led.work); in k90_init_macro_functions()
513 kfree(k90->record_led.cdev.name); in k90_init_macro_functions()
515 kfree(k90); in k90_init_macro_functions()
517 drvdata->k90 = NULL; in k90_init_macro_functions()
537 struct k90_drvdata *k90 = drvdata->k90; in k90_cleanup_macro_functions() local
539 if (k90) { in k90_cleanup_macro_functions()
542 k90->record_led.removed = true; in k90_cleanup_macro_functions()
543 led_classdev_unregister(&k90->record_led.cdev); in k90_cleanup_macro_functions()
544 cancel_work_sync(&k90->record_led.work); in k90_cleanup_macro_functions()
545 kfree(k90->record_led.cdev.name); in k90_cleanup_macro_functions()
547 kfree(k90); in k90_cleanup_macro_functions()
610 if (!drvdata->k90) in corsair_event()
615 drvdata->k90->record_led.brightness = 1; in corsair_event()
618 drvdata->k90->record_led.brightness = 0; in corsair_event()