Lines Matching refs:retval
110 int retval; in kone_check_write() local
120 retval = kone_receive(usb_dev, in kone_check_write()
122 if (retval) in kone_check_write()
123 return retval; in kone_check_write()
160 int retval; in kone_set_settings() local
162 retval = kone_send(usb_dev, kone_command_settings, in kone_set_settings()
164 if (retval) in kone_set_settings()
165 return retval; in kone_set_settings()
232 int retval; in kone_get_weight() local
235 retval = kone_receive(usb_dev, kone_command_weight, &data, 1); in kone_get_weight()
237 if (retval) in kone_get_weight()
238 return retval; in kone_get_weight()
251 int retval; in kone_get_firmware_version() local
254 retval = kone_receive(usb_dev, kone_command_firmware_version, in kone_get_firmware_version()
256 if (retval) in kone_get_firmware_version()
257 return retval; in kone_get_firmware_version()
293 int retval = 0, difference, old_profile; in kone_sysfs_write_settings() local
306 retval = -EINVAL; in kone_sysfs_write_settings()
310 retval = kone_set_settings(usb_dev, settings); in kone_sysfs_write_settings()
311 if (retval) in kone_sysfs_write_settings()
325 if (retval) in kone_sysfs_write_settings()
326 return retval; in kone_sysfs_write_settings()
360 int retval = 0, difference; in kone_sysfs_write_profilex() local
371 retval = kone_set_profile(usb_dev, in kone_sysfs_write_profilex()
374 if (!retval) in kone_sysfs_write_profilex()
379 if (retval) in kone_sysfs_write_profilex()
380 return retval; in kone_sysfs_write_profilex()
423 int retval; in kone_sysfs_show_weight() local
430 retval = kone_get_weight(usb_dev, &weight); in kone_sysfs_show_weight()
433 if (retval) in kone_sysfs_show_weight()
434 return retval; in kone_sysfs_show_weight()
474 int retval; in kone_sysfs_set_tcu() local
481 retval = kstrtoul(buf, 10, &state); in kone_sysfs_set_tcu()
482 if (retval) in kone_sysfs_set_tcu()
483 return retval; in kone_sysfs_set_tcu()
491 retval = kone_tcu_command(usb_dev, 1); in kone_sysfs_set_tcu()
492 if (retval) in kone_sysfs_set_tcu()
494 retval = kone_tcu_command(usb_dev, 2); in kone_sysfs_set_tcu()
495 if (retval) in kone_sysfs_set_tcu()
498 retval = kone_tcu_command(usb_dev, 3); in kone_sysfs_set_tcu()
499 if (retval) in kone_sysfs_set_tcu()
501 retval = kone_tcu_command(usb_dev, 0); in kone_sysfs_set_tcu()
502 if (retval) in kone_sysfs_set_tcu()
504 retval = kone_tcu_command(usb_dev, 4); in kone_sysfs_set_tcu()
505 if (retval) in kone_sysfs_set_tcu()
517 retval = kone_get_settings(usb_dev, &kone->settings); in kone_sysfs_set_tcu()
518 if (retval) in kone_sysfs_set_tcu()
526 retval = kone_set_settings(usb_dev, &kone->settings); in kone_sysfs_set_tcu()
527 if (retval) { in kone_sysfs_set_tcu()
533 retval = kone_get_settings(usb_dev, &kone->settings); in kone_sysfs_set_tcu()
534 if (retval) in kone_sysfs_set_tcu()
542 retval = size; in kone_sysfs_set_tcu()
547 return retval; in kone_sysfs_set_tcu()
564 int retval; in kone_sysfs_set_startup_profile() local
571 retval = kstrtoul(buf, 10, &new_startup_profile); in kone_sysfs_set_startup_profile()
572 if (retval) in kone_sysfs_set_startup_profile()
573 return retval; in kone_sysfs_set_startup_profile()
583 retval = kone_set_settings(usb_dev, &kone->settings); in kone_sysfs_set_startup_profile()
584 if (retval) { in kone_sysfs_set_startup_profile()
586 return retval; in kone_sysfs_set_startup_profile()
667 int retval; in kone_init_kone_device_struct() local
672 retval = kone_get_profile(usb_dev, &kone->profiles[i], i + 1); in kone_init_kone_device_struct()
673 if (retval) in kone_init_kone_device_struct()
674 return retval; in kone_init_kone_device_struct()
677 retval = kone_get_settings(usb_dev, &kone->settings); in kone_init_kone_device_struct()
678 if (retval) in kone_init_kone_device_struct()
679 return retval; in kone_init_kone_device_struct()
681 retval = kone_get_firmware_version(usb_dev, &kone->firmware_version); in kone_init_kone_device_struct()
682 if (retval) in kone_init_kone_device_struct()
683 return retval; in kone_init_kone_device_struct()
702 int retval; in kone_init_specials() local
712 retval = kone_init_kone_device_struct(usb_dev, kone); in kone_init_specials()
713 if (retval) { in kone_init_specials()
718 retval = roccat_connect(&kone_class, hdev, in kone_init_specials()
720 if (retval < 0) { in kone_init_specials()
725 kone->chrdev_minor = retval; in kone_init_specials()
734 return retval; in kone_init_specials()
753 int retval; in kone_probe() local
758 retval = hid_parse(hdev); in kone_probe()
759 if (retval) { in kone_probe()
764 retval = hid_hw_start(hdev, HID_CONNECT_DEFAULT); in kone_probe()
765 if (retval) { in kone_probe()
770 retval = kone_init_specials(hdev); in kone_probe()
771 if (retval) { in kone_probe()
781 return retval; in kone_probe()
893 int retval; in kone_init() local
896 retval = class_register(&kone_class); in kone_init()
897 if (retval) in kone_init()
898 return retval; in kone_init()
900 retval = hid_register_driver(&kone_driver); in kone_init()
901 if (retval) in kone_init()
903 return retval; in kone_init()