Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

HID: roccat: add new device return value

Ryos uses a new return value for critical errors, others have been
confirmed.

Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

authored by

Stefan Achatz and committed by
Jiri Kosina
14fc4290 1c241131

+6 -6
+6 -6
drivers/hid/hid-roccat-common.c
··· 65 65 EXPORT_SYMBOL_GPL(roccat_common2_send); 66 66 67 67 enum roccat_common2_control_states { 68 - ROCCAT_COMMON_CONTROL_STATUS_OVERLOAD = 0, 68 + ROCCAT_COMMON_CONTROL_STATUS_CRITICAL = 0, 69 69 ROCCAT_COMMON_CONTROL_STATUS_OK = 1, 70 70 ROCCAT_COMMON_CONTROL_STATUS_INVALID = 2, 71 - ROCCAT_COMMON_CONTROL_STATUS_WAIT = 3, 71 + ROCCAT_COMMON_CONTROL_STATUS_BUSY = 3, 72 + ROCCAT_COMMON_CONTROL_STATUS_CRITICAL_NEW = 4, 72 73 }; 73 74 74 75 static int roccat_common2_receive_control_status(struct usb_device *usb_dev) ··· 89 88 switch (control.value) { 90 89 case ROCCAT_COMMON_CONTROL_STATUS_OK: 91 90 return 0; 92 - case ROCCAT_COMMON_CONTROL_STATUS_WAIT: 91 + case ROCCAT_COMMON_CONTROL_STATUS_BUSY: 93 92 msleep(500); 94 93 continue; 95 94 case ROCCAT_COMMON_CONTROL_STATUS_INVALID: 96 - 97 - case ROCCAT_COMMON_CONTROL_STATUS_OVERLOAD: 98 - /* seems to be critical - replug necessary */ 95 + case ROCCAT_COMMON_CONTROL_STATUS_CRITICAL: 96 + case ROCCAT_COMMON_CONTROL_STATUS_CRITICAL_NEW: 99 97 return -EINVAL; 100 98 default: 101 99 dev_err(&usb_dev->dev,