aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc
diff options
context:
space:
mode:
authorYani Ioannou <yani.ioannou@gmail.com>2005-05-17 06:44:04 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-20 18:15:35 -0400
commit060b8845e6bea938d65ad6f89e83507e5ff4fec4 (patch)
treeba82ce7d7a532b045f02e29788ece53d6be693e6 /drivers/usb/misc
parent10523b3b82456e416cbaffcc24ea2246980aa746 (diff)
[PATCH] Driver Core: drivers/usb/input/aiptek.c - drivers/zorro/zorro-sysfs.c: update device attribute callbacks
Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r--drivers/usb/misc/cytherm.c20
-rw-r--r--drivers/usb/misc/phidgetkit.c14
-rw-r--r--drivers/usb/misc/phidgetservo.c4
-rw-r--r--drivers/usb/misc/usbled.c4
4 files changed, 21 insertions, 21 deletions
diff --git a/drivers/usb/misc/cytherm.c b/drivers/usb/misc/cytherm.c
index 626e2b05f719..b33044d56a1e 100644
--- a/drivers/usb/misc/cytherm.c
+++ b/drivers/usb/misc/cytherm.c
@@ -85,7 +85,7 @@ static int vendor_command(struct usb_device *dev, unsigned char request,
85#define BRIGHTNESS 0x2c /* RAM location for brightness value */ 85#define BRIGHTNESS 0x2c /* RAM location for brightness value */
86#define BRIGHTNESS_SEM 0x2b /* RAM location for brightness semaphore */ 86#define BRIGHTNESS_SEM 0x2b /* RAM location for brightness semaphore */
87 87
88static ssize_t show_brightness(struct device *dev, char *buf) 88static ssize_t show_brightness(struct device *dev, struct device_attribute *attr, char *buf)
89{ 89{
90 struct usb_interface *intf = to_usb_interface(dev); 90 struct usb_interface *intf = to_usb_interface(dev);
91 struct usb_cytherm *cytherm = usb_get_intfdata(intf); 91 struct usb_cytherm *cytherm = usb_get_intfdata(intf);
@@ -93,7 +93,7 @@ static ssize_t show_brightness(struct device *dev, char *buf)
93 return sprintf(buf, "%i", cytherm->brightness); 93 return sprintf(buf, "%i", cytherm->brightness);
94} 94}
95 95
96static ssize_t set_brightness(struct device *dev, const char *buf, 96static ssize_t set_brightness(struct device *dev, struct device_attribute *attr, const char *buf,
97 size_t count) 97 size_t count)
98{ 98{
99 struct usb_interface *intf = to_usb_interface(dev); 99 struct usb_interface *intf = to_usb_interface(dev);
@@ -138,7 +138,7 @@ static DEVICE_ATTR(brightness, S_IRUGO | S_IWUSR | S_IWGRP,
138#define TEMP 0x33 /* RAM location for temperature */ 138#define TEMP 0x33 /* RAM location for temperature */
139#define SIGN 0x34 /* RAM location for temperature sign */ 139#define SIGN 0x34 /* RAM location for temperature sign */
140 140
141static ssize_t show_temp(struct device *dev, char *buf) 141static ssize_t show_temp(struct device *dev, struct device_attribute *attr, char *buf)
142{ 142{
143 143
144 struct usb_interface *intf = to_usb_interface(dev); 144 struct usb_interface *intf = to_usb_interface(dev);
@@ -174,7 +174,7 @@ static ssize_t show_temp(struct device *dev, char *buf)
174} 174}
175 175
176 176
177static ssize_t set_temp(struct device *dev, const char *buf, size_t count) 177static ssize_t set_temp(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
178{ 178{
179 return count; 179 return count;
180} 180}
@@ -184,7 +184,7 @@ static DEVICE_ATTR(temp, S_IRUGO, show_temp, set_temp);
184 184
185#define BUTTON 0x7a 185#define BUTTON 0x7a
186 186
187static ssize_t show_button(struct device *dev, char *buf) 187static ssize_t show_button(struct device *dev, struct device_attribute *attr, char *buf)
188{ 188{
189 189
190 struct usb_interface *intf = to_usb_interface(dev); 190 struct usb_interface *intf = to_usb_interface(dev);
@@ -215,7 +215,7 @@ static ssize_t show_button(struct device *dev, char *buf)
215} 215}
216 216
217 217
218static ssize_t set_button(struct device *dev, const char *buf, size_t count) 218static ssize_t set_button(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
219{ 219{
220 return count; 220 return count;
221} 221}
@@ -223,7 +223,7 @@ static ssize_t set_button(struct device *dev, const char *buf, size_t count)
223static DEVICE_ATTR(button, S_IRUGO, show_button, set_button); 223static DEVICE_ATTR(button, S_IRUGO, show_button, set_button);
224 224
225 225
226static ssize_t show_port0(struct device *dev, char *buf) 226static ssize_t show_port0(struct device *dev, struct device_attribute *attr, char *buf)
227{ 227{
228 struct usb_interface *intf = to_usb_interface(dev); 228 struct usb_interface *intf = to_usb_interface(dev);
229 struct usb_cytherm *cytherm = usb_get_intfdata(intf); 229 struct usb_cytherm *cytherm = usb_get_intfdata(intf);
@@ -249,7 +249,7 @@ static ssize_t show_port0(struct device *dev, char *buf)
249} 249}
250 250
251 251
252static ssize_t set_port0(struct device *dev, const char *buf, size_t count) 252static ssize_t set_port0(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
253{ 253{
254 struct usb_interface *intf = to_usb_interface(dev); 254 struct usb_interface *intf = to_usb_interface(dev);
255 struct usb_cytherm *cytherm = usb_get_intfdata(intf); 255 struct usb_cytherm *cytherm = usb_get_intfdata(intf);
@@ -283,7 +283,7 @@ static ssize_t set_port0(struct device *dev, const char *buf, size_t count)
283 283
284static DEVICE_ATTR(port0, S_IRUGO | S_IWUSR | S_IWGRP, show_port0, set_port0); 284static DEVICE_ATTR(port0, S_IRUGO | S_IWUSR | S_IWGRP, show_port0, set_port0);
285 285
286static ssize_t show_port1(struct device *dev, char *buf) 286static ssize_t show_port1(struct device *dev, struct device_attribute *attr, char *buf)
287{ 287{
288 struct usb_interface *intf = to_usb_interface(dev); 288 struct usb_interface *intf = to_usb_interface(dev);
289 struct usb_cytherm *cytherm = usb_get_intfdata(intf); 289 struct usb_cytherm *cytherm = usb_get_intfdata(intf);
@@ -309,7 +309,7 @@ static ssize_t show_port1(struct device *dev, char *buf)
309} 309}
310 310
311 311
312static ssize_t set_port1(struct device *dev, const char *buf, size_t count) 312static ssize_t set_port1(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
313{ 313{
314 struct usb_interface *intf = to_usb_interface(dev); 314 struct usb_interface *intf = to_usb_interface(dev);
315 struct usb_cytherm *cytherm = usb_get_intfdata(intf); 315 struct usb_cytherm *cytherm = usb_get_intfdata(intf);
diff --git a/drivers/usb/misc/phidgetkit.c b/drivers/usb/misc/phidgetkit.c
index ddbf8e992368..067a81486921 100644
--- a/drivers/usb/misc/phidgetkit.c
+++ b/drivers/usb/misc/phidgetkit.c
@@ -173,7 +173,7 @@ exit:
173} 173}
174 174
175#define set_lcd_line(number) \ 175#define set_lcd_line(number) \
176static ssize_t lcd_line_##number(struct device *dev, const char *buf, size_t count) \ 176static ssize_t lcd_line_##number(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) \
177{ \ 177{ \
178 struct usb_interface *intf = to_usb_interface(dev); \ 178 struct usb_interface *intf = to_usb_interface(dev); \
179 struct phidget_interfacekit *kit = usb_get_intfdata(intf); \ 179 struct phidget_interfacekit *kit = usb_get_intfdata(intf); \
@@ -184,7 +184,7 @@ static DEVICE_ATTR(lcd_line_##number, S_IWUGO, NULL, lcd_line_##number);
184set_lcd_line(1); 184set_lcd_line(1);
185set_lcd_line(2); 185set_lcd_line(2);
186 186
187static ssize_t set_backlight(struct device *dev, const char *buf, size_t count) 187static ssize_t set_backlight(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
188{ 188{
189 struct usb_interface *intf = to_usb_interface(dev); 189 struct usb_interface *intf = to_usb_interface(dev);
190 struct phidget_interfacekit *kit = usb_get_intfdata(intf); 190 struct phidget_interfacekit *kit = usb_get_intfdata(intf);
@@ -232,7 +232,7 @@ static void remove_lcd_files(struct phidget_interfacekit *kit)
232 } 232 }
233} 233}
234 234
235static ssize_t enable_lcd_files(struct device *dev, const char *buf, size_t count) 235static ssize_t enable_lcd_files(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
236{ 236{
237 struct usb_interface *intf = to_usb_interface(dev); 237 struct usb_interface *intf = to_usb_interface(dev);
238 struct phidget_interfacekit *kit = usb_get_intfdata(intf); 238 struct phidget_interfacekit *kit = usb_get_intfdata(intf);
@@ -307,7 +307,7 @@ resubmit:
307} 307}
308 308
309#define show_set_output(value) \ 309#define show_set_output(value) \
310static ssize_t set_output##value(struct device *dev, const char *buf, \ 310static ssize_t set_output##value(struct device *dev, struct device_attribute *attr, const char *buf, \
311 size_t count) \ 311 size_t count) \
312{ \ 312{ \
313 struct usb_interface *intf = to_usb_interface(dev); \ 313 struct usb_interface *intf = to_usb_interface(dev); \
@@ -324,7 +324,7 @@ static ssize_t set_output##value(struct device *dev, const char *buf, \
324 return retval ? retval : count; \ 324 return retval ? retval : count; \
325} \ 325} \
326 \ 326 \
327static ssize_t show_output##value(struct device *dev, char *buf) \ 327static ssize_t show_output##value(struct device *dev, struct device_attribute *attr, char *buf) \
328{ \ 328{ \
329 struct usb_interface *intf = to_usb_interface(dev); \ 329 struct usb_interface *intf = to_usb_interface(dev); \
330 struct phidget_interfacekit *kit = usb_get_intfdata(intf); \ 330 struct phidget_interfacekit *kit = usb_get_intfdata(intf); \
@@ -343,7 +343,7 @@ show_set_output(7);
343show_set_output(8); /* should be MAX_INTERFACES - 1 */ 343show_set_output(8); /* should be MAX_INTERFACES - 1 */
344 344
345#define show_input(value) \ 345#define show_input(value) \
346static ssize_t show_input##value(struct device *dev, char *buf) \ 346static ssize_t show_input##value(struct device *dev, struct device_attribute *attr, char *buf) \
347{ \ 347{ \
348 struct usb_interface *intf = to_usb_interface(dev); \ 348 struct usb_interface *intf = to_usb_interface(dev); \
349 struct phidget_interfacekit *kit = usb_get_intfdata(intf); \ 349 struct phidget_interfacekit *kit = usb_get_intfdata(intf); \
@@ -362,7 +362,7 @@ show_input(7);
362show_input(8); /* should be MAX_INTERFACES - 1 */ 362show_input(8); /* should be MAX_INTERFACES - 1 */
363 363
364#define show_sensor(value) \ 364#define show_sensor(value) \
365static ssize_t show_sensor##value(struct device *dev, char *buf) \ 365static ssize_t show_sensor##value(struct device *dev, struct device_attribute *attr, char *buf) \
366{ \ 366{ \
367 struct usb_interface *intf = to_usb_interface(dev); \ 367 struct usb_interface *intf = to_usb_interface(dev); \
368 struct phidget_interfacekit *kit = usb_get_intfdata(intf); \ 368 struct phidget_interfacekit *kit = usb_get_intfdata(intf); \
diff --git a/drivers/usb/misc/phidgetservo.c b/drivers/usb/misc/phidgetservo.c
index 4bd291502a3c..b84eda631ab5 100644
--- a/drivers/usb/misc/phidgetservo.c
+++ b/drivers/usb/misc/phidgetservo.c
@@ -207,7 +207,7 @@ change_position_v20(struct phidget_servo *servo, int servo_no, int degrees,
207} 207}
208 208
209#define show_set(value) \ 209#define show_set(value) \
210static ssize_t set_servo##value (struct device *dev, \ 210static ssize_t set_servo##value (struct device *dev, struct device_attribute *attr, \
211 const char *buf, size_t count) \ 211 const char *buf, size_t count) \
212{ \ 212{ \
213 int degrees, minutes, retval; \ 213 int degrees, minutes, retval; \
@@ -233,7 +233,7 @@ static ssize_t set_servo##value (struct device *dev, \
233 return retval < 0 ? retval : count; \ 233 return retval < 0 ? retval : count; \
234} \ 234} \
235 \ 235 \
236static ssize_t show_servo##value (struct device *dev, char *buf) \ 236static ssize_t show_servo##value (struct device *dev, struct device_attribute *attr, char *buf) \
237{ \ 237{ \
238 struct usb_interface *intf = to_usb_interface (dev); \ 238 struct usb_interface *intf = to_usb_interface (dev); \
239 struct phidget_servo *servo = usb_get_intfdata (intf); \ 239 struct phidget_servo *servo = usb_get_intfdata (intf); \
diff --git a/drivers/usb/misc/usbled.c b/drivers/usb/misc/usbled.c
index ee329d5e1c5e..f6ba4c788dbc 100644
--- a/drivers/usb/misc/usbled.c
+++ b/drivers/usb/misc/usbled.c
@@ -81,14 +81,14 @@ static void change_color(struct usb_led *led)
81} 81}
82 82
83#define show_set(value) \ 83#define show_set(value) \
84static ssize_t show_##value(struct device *dev, char *buf) \ 84static ssize_t show_##value(struct device *dev, struct device_attribute *attr, char *buf) \
85{ \ 85{ \
86 struct usb_interface *intf = to_usb_interface(dev); \ 86 struct usb_interface *intf = to_usb_interface(dev); \
87 struct usb_led *led = usb_get_intfdata(intf); \ 87 struct usb_led *led = usb_get_intfdata(intf); \
88 \ 88 \
89 return sprintf(buf, "%d\n", led->value); \ 89 return sprintf(buf, "%d\n", led->value); \
90} \ 90} \
91static ssize_t set_##value(struct device *dev, const char *buf, size_t count) \ 91static ssize_t set_##value(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) \
92{ \ 92{ \
93 struct usb_interface *intf = to_usb_interface(dev); \ 93 struct usb_interface *intf = to_usb_interface(dev); \
94 struct usb_led *led = usb_get_intfdata(intf); \ 94 struct usb_led *led = usb_get_intfdata(intf); \