aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-02 00:33:59 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-02 00:33:59 -0400
commite1a344d3ded6df7c1938e7f70b9f28c15358e7ba (patch)
tree6931d469be8847aac9a1a32aad78c1f93b3e9b5d /drivers/usb/misc
parenta341c6b29503d1326e7ada1dfa5515b53a5f6276 (diff)
USB: rio500.c: remove dbg() usage
dbg() was a very old USB-specific macro that should no longer be used. This patch removes it from being used in the driver and uses dev_dbg() instead. CC: Cesar Miquel <miquel@df.uba.ar> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r--drivers/usb/misc/rio500.c37
1 files changed, 21 insertions, 16 deletions
diff --git a/drivers/usb/misc/rio500.c b/drivers/usb/misc/rio500.c
index cb55dc5330df..1084124c4a44 100644
--- a/drivers/usb/misc/rio500.c
+++ b/drivers/usb/misc/rio500.c
@@ -153,10 +153,10 @@ static long ioctl_rio(struct file *file, unsigned int cmd, unsigned long arg)
153 153
154 requesttype = rio_cmd.requesttype | USB_DIR_IN | 154 requesttype = rio_cmd.requesttype | USB_DIR_IN |
155 USB_TYPE_VENDOR | USB_RECIP_DEVICE; 155 USB_TYPE_VENDOR | USB_RECIP_DEVICE;
156 dbg 156 dev_dbg(&rio->rio_dev->dev,
157 ("sending command:reqtype=%0x req=%0x value=%0x index=%0x len=%0x", 157 "sending command:reqtype=%0x req=%0x value=%0x index=%0x len=%0x\n",
158 requesttype, rio_cmd.request, rio_cmd.value, 158 requesttype, rio_cmd.request, rio_cmd.value,
159 rio_cmd.index, rio_cmd.length); 159 rio_cmd.index, rio_cmd.length);
160 /* Send rio control message */ 160 /* Send rio control message */
161 retries = 3; 161 retries = 3;
162 while (retries) { 162 while (retries) {
@@ -176,8 +176,9 @@ static long ioctl_rio(struct file *file, unsigned int cmd, unsigned long arg)
176 result); 176 result);
177 retries = 0; 177 retries = 0;
178 } else { 178 } else {
179 dbg("Executed ioctl. Result = %d (data=%02x)", 179 dev_dbg(&rio->rio_dev->dev,
180 result, buffer[0]); 180 "Executed ioctl. Result = %d (data=%02x)\n",
181 result, buffer[0]);
181 if (copy_to_user(rio_cmd.buffer, buffer, 182 if (copy_to_user(rio_cmd.buffer, buffer,
182 rio_cmd.length)) { 183 rio_cmd.length)) {
183 free_page((unsigned long) buffer); 184 free_page((unsigned long) buffer);
@@ -223,9 +224,10 @@ static long ioctl_rio(struct file *file, unsigned int cmd, unsigned long arg)
223 224
224 requesttype = rio_cmd.requesttype | USB_DIR_OUT | 225 requesttype = rio_cmd.requesttype | USB_DIR_OUT |
225 USB_TYPE_VENDOR | USB_RECIP_DEVICE; 226 USB_TYPE_VENDOR | USB_RECIP_DEVICE;
226 dbg("sending command: reqtype=%0x req=%0x value=%0x index=%0x len=%0x", 227 dev_dbg(&rio->rio_dev->dev,
227 requesttype, rio_cmd.request, rio_cmd.value, 228 "sending command: reqtype=%0x req=%0x value=%0x index=%0x len=%0x\n",
228 rio_cmd.index, rio_cmd.length); 229 requesttype, rio_cmd.request, rio_cmd.value,
230 rio_cmd.index, rio_cmd.length);
229 /* Send rio control message */ 231 /* Send rio control message */
230 retries = 3; 232 retries = 3;
231 while (retries) { 233 while (retries) {
@@ -245,7 +247,8 @@ static long ioctl_rio(struct file *file, unsigned int cmd, unsigned long arg)
245 result); 247 result);
246 retries = 0; 248 retries = 0;
247 } else { 249 } else {
248 dbg("Executed ioctl. Result = %d", result); 250 dev_dbg(&rio->rio_dev->dev,
251 "Executed ioctl. Result = %d\n", result);
249 retries = 0; 252 retries = 0;
250 253
251 } 254 }
@@ -317,8 +320,9 @@ write_rio(struct file *file, const char __user *buffer,
317 usb_sndbulkpipe(rio->rio_dev, 2), 320 usb_sndbulkpipe(rio->rio_dev, 2),
318 obuf, thistime, &partial, 5000); 321 obuf, thistime, &partial, 5000);
319 322
320 dbg("write stats: result:%d thistime:%lu partial:%u", 323 dev_dbg(&rio->rio_dev->dev,
321 result, thistime, partial); 324 "write stats: result:%d thistime:%lu partial:%u\n",
325 result, thistime, partial);
322 326
323 if (result == -ETIMEDOUT) { /* NAK - so hold for a while */ 327 if (result == -ETIMEDOUT) { /* NAK - so hold for a while */
324 if (!maxretry--) { 328 if (!maxretry--) {
@@ -398,8 +402,9 @@ read_rio(struct file *file, char __user *buffer, size_t count, loff_t * ppos)
398 ibuf, this_read, &partial, 402 ibuf, this_read, &partial,
399 8000); 403 8000);
400 404
401 dbg("read stats: result:%d this_read:%u partial:%u", 405 dev_dbg(&rio->rio_dev->dev,
402 result, this_read, partial); 406 "read stats: result:%d this_read:%u partial:%u\n",
407 result, this_read, partial);
403 408
404 if (partial) { 409 if (partial) {
405 count = this_read = partial; 410 count = this_read = partial;
@@ -479,7 +484,7 @@ static int probe_rio(struct usb_interface *intf,
479 usb_deregister_dev(intf, &usb_rio_class); 484 usb_deregister_dev(intf, &usb_rio_class);
480 return -ENOMEM; 485 return -ENOMEM;
481 } 486 }
482 dbg("probe_rio: obuf address:%p", rio->obuf); 487 dev_dbg(&intf->dev, "obuf address:%p\n", rio->obuf);
483 488
484 if (!(rio->ibuf = kmalloc(IBUF_SIZE, GFP_KERNEL))) { 489 if (!(rio->ibuf = kmalloc(IBUF_SIZE, GFP_KERNEL))) {
485 dev_err(&dev->dev, 490 dev_err(&dev->dev,
@@ -488,7 +493,7 @@ static int probe_rio(struct usb_interface *intf,
488 kfree(rio->obuf); 493 kfree(rio->obuf);
489 return -ENOMEM; 494 return -ENOMEM;
490 } 495 }
491 dbg("probe_rio: ibuf address:%p", rio->ibuf); 496 dev_dbg(&intf->dev, "ibuf address:%p\n", rio->ibuf);
492 497
493 mutex_init(&(rio->lock)); 498 mutex_init(&(rio->lock));
494 499