diff options
author | Stefan Achatz <erazor_de@users.sourceforge.net> | 2012-05-20 16:45:04 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2012-06-28 04:34:01 -0400 |
commit | 7392d73be2b3c907d65126f072c313215e1907b3 (patch) | |
tree | a10a80d29a8f17e1e330e4b50db48aff468e9c3c /drivers/hid/hid-roccat-koneplus.c | |
parent | 4ec141ad4e470485803a98ddb250aa7df030e8df (diff) |
HID: roccat: rename roccat_common functions to roccat_common2
Did this to illustrate my understanding of the firmware generations:
Valo and Kone were 1st generation
Arvo was externaly developed and lies in the middle
All others until now are considered 2nd generation
Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-roccat-koneplus.c')
-rw-r--r-- | drivers/hid/hid-roccat-koneplus.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/hid/hid-roccat-koneplus.c b/drivers/hid/hid-roccat-koneplus.c index 01167a831258..f5602fec4865 100644 --- a/drivers/hid/hid-roccat-koneplus.c +++ b/drivers/hid/hid-roccat-koneplus.c | |||
@@ -39,7 +39,7 @@ static void koneplus_profile_activated(struct koneplus_device *koneplus, | |||
39 | static int koneplus_send_control(struct usb_device *usb_dev, uint value, | 39 | static int koneplus_send_control(struct usb_device *usb_dev, uint value, |
40 | enum koneplus_control_requests request) | 40 | enum koneplus_control_requests request) |
41 | { | 41 | { |
42 | struct roccat_common_control control; | 42 | struct roccat_common2_control control; |
43 | 43 | ||
44 | if ((request == KONEPLUS_CONTROL_REQUEST_PROFILE_SETTINGS || | 44 | if ((request == KONEPLUS_CONTROL_REQUEST_PROFILE_SETTINGS || |
45 | request == KONEPLUS_CONTROL_REQUEST_PROFILE_BUTTONS) && | 45 | request == KONEPLUS_CONTROL_REQUEST_PROFILE_BUTTONS) && |
@@ -50,15 +50,15 @@ static int koneplus_send_control(struct usb_device *usb_dev, uint value, | |||
50 | control.value = value; | 50 | control.value = value; |
51 | control.request = request; | 51 | control.request = request; |
52 | 52 | ||
53 | return roccat_common_send_with_status(usb_dev, | 53 | return roccat_common2_send_with_status(usb_dev, |
54 | ROCCAT_COMMON_COMMAND_CONTROL, | 54 | ROCCAT_COMMON_COMMAND_CONTROL, |
55 | &control, sizeof(struct roccat_common_control)); | 55 | &control, sizeof(struct roccat_common2_control)); |
56 | } | 56 | } |
57 | 57 | ||
58 | static int koneplus_get_info(struct usb_device *usb_dev, | 58 | static int koneplus_get_info(struct usb_device *usb_dev, |
59 | struct koneplus_info *buf) | 59 | struct koneplus_info *buf) |
60 | { | 60 | { |
61 | return roccat_common_receive(usb_dev, KONEPLUS_COMMAND_INFO, | 61 | return roccat_common2_receive(usb_dev, KONEPLUS_COMMAND_INFO, |
62 | buf, sizeof(struct koneplus_info)); | 62 | buf, sizeof(struct koneplus_info)); |
63 | } | 63 | } |
64 | 64 | ||
@@ -72,14 +72,14 @@ static int koneplus_get_profile_settings(struct usb_device *usb_dev, | |||
72 | if (retval) | 72 | if (retval) |
73 | return retval; | 73 | return retval; |
74 | 74 | ||
75 | return roccat_common_receive(usb_dev, KONEPLUS_COMMAND_PROFILE_SETTINGS, | 75 | return roccat_common2_receive(usb_dev, KONEPLUS_COMMAND_PROFILE_SETTINGS, |
76 | buf, sizeof(struct koneplus_profile_settings)); | 76 | buf, sizeof(struct koneplus_profile_settings)); |
77 | } | 77 | } |
78 | 78 | ||
79 | static int koneplus_set_profile_settings(struct usb_device *usb_dev, | 79 | static int koneplus_set_profile_settings(struct usb_device *usb_dev, |
80 | struct koneplus_profile_settings const *settings) | 80 | struct koneplus_profile_settings const *settings) |
81 | { | 81 | { |
82 | return roccat_common_send_with_status(usb_dev, | 82 | return roccat_common2_send_with_status(usb_dev, |
83 | KONEPLUS_COMMAND_PROFILE_SETTINGS, | 83 | KONEPLUS_COMMAND_PROFILE_SETTINGS, |
84 | settings, sizeof(struct koneplus_profile_settings)); | 84 | settings, sizeof(struct koneplus_profile_settings)); |
85 | } | 85 | } |
@@ -94,14 +94,14 @@ static int koneplus_get_profile_buttons(struct usb_device *usb_dev, | |||
94 | if (retval) | 94 | if (retval) |
95 | return retval; | 95 | return retval; |
96 | 96 | ||
97 | return roccat_common_receive(usb_dev, KONEPLUS_COMMAND_PROFILE_BUTTONS, | 97 | return roccat_common2_receive(usb_dev, KONEPLUS_COMMAND_PROFILE_BUTTONS, |
98 | buf, sizeof(struct koneplus_profile_buttons)); | 98 | buf, sizeof(struct koneplus_profile_buttons)); |
99 | } | 99 | } |
100 | 100 | ||
101 | static int koneplus_set_profile_buttons(struct usb_device *usb_dev, | 101 | static int koneplus_set_profile_buttons(struct usb_device *usb_dev, |
102 | struct koneplus_profile_buttons const *buttons) | 102 | struct koneplus_profile_buttons const *buttons) |
103 | { | 103 | { |
104 | return roccat_common_send_with_status(usb_dev, | 104 | return roccat_common2_send_with_status(usb_dev, |
105 | KONEPLUS_COMMAND_PROFILE_BUTTONS, | 105 | KONEPLUS_COMMAND_PROFILE_BUTTONS, |
106 | buttons, sizeof(struct koneplus_profile_buttons)); | 106 | buttons, sizeof(struct koneplus_profile_buttons)); |
107 | } | 107 | } |
@@ -112,7 +112,7 @@ static int koneplus_get_actual_profile(struct usb_device *usb_dev) | |||
112 | struct koneplus_actual_profile buf; | 112 | struct koneplus_actual_profile buf; |
113 | int retval; | 113 | int retval; |
114 | 114 | ||
115 | retval = roccat_common_receive(usb_dev, KONEPLUS_COMMAND_ACTUAL_PROFILE, | 115 | retval = roccat_common2_receive(usb_dev, KONEPLUS_COMMAND_ACTUAL_PROFILE, |
116 | &buf, sizeof(struct koneplus_actual_profile)); | 116 | &buf, sizeof(struct koneplus_actual_profile)); |
117 | 117 | ||
118 | return retval ? retval : buf.actual_profile; | 118 | return retval ? retval : buf.actual_profile; |
@@ -127,7 +127,7 @@ static int koneplus_set_actual_profile(struct usb_device *usb_dev, | |||
127 | buf.size = sizeof(struct koneplus_actual_profile); | 127 | buf.size = sizeof(struct koneplus_actual_profile); |
128 | buf.actual_profile = new_profile; | 128 | buf.actual_profile = new_profile; |
129 | 129 | ||
130 | return roccat_common_send_with_status(usb_dev, | 130 | return roccat_common2_send_with_status(usb_dev, |
131 | KONEPLUS_COMMAND_ACTUAL_PROFILE, | 131 | KONEPLUS_COMMAND_ACTUAL_PROFILE, |
132 | &buf, sizeof(struct koneplus_actual_profile)); | 132 | &buf, sizeof(struct koneplus_actual_profile)); |
133 | } | 133 | } |
@@ -149,7 +149,7 @@ static ssize_t koneplus_sysfs_read(struct file *fp, struct kobject *kobj, | |||
149 | return -EINVAL; | 149 | return -EINVAL; |
150 | 150 | ||
151 | mutex_lock(&koneplus->koneplus_lock); | 151 | mutex_lock(&koneplus->koneplus_lock); |
152 | retval = roccat_common_receive(usb_dev, command, buf, real_size); | 152 | retval = roccat_common2_receive(usb_dev, command, buf, real_size); |
153 | mutex_unlock(&koneplus->koneplus_lock); | 153 | mutex_unlock(&koneplus->koneplus_lock); |
154 | 154 | ||
155 | if (retval) | 155 | if (retval) |
@@ -172,7 +172,7 @@ static ssize_t koneplus_sysfs_write(struct file *fp, struct kobject *kobj, | |||
172 | return -EINVAL; | 172 | return -EINVAL; |
173 | 173 | ||
174 | mutex_lock(&koneplus->koneplus_lock); | 174 | mutex_lock(&koneplus->koneplus_lock); |
175 | retval = roccat_common_send_with_status(usb_dev, command, | 175 | retval = roccat_common2_send_with_status(usb_dev, command, |
176 | buf, real_size); | 176 | buf, real_size); |
177 | mutex_unlock(&koneplus->koneplus_lock); | 177 | mutex_unlock(&koneplus->koneplus_lock); |
178 | 178 | ||