aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/rio500.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-20 19:53:48 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-20 19:53:48 -0400
commitc41fba132e913c4696b6a87cc3c97ac0a95ce31a (patch)
tree4a41b98dd3f2b44a9bf8172df1d2496df6c62e54 /drivers/usb/misc/rio500.c
parent9d974b2a06e34646f1787a1bbc7ffe7de61c23ef (diff)
USB: rio500.c: remove err() usage
err() was a very old USB-specific macro that I thought had gone away. This patch removes it from being used in the driver and uses dev_err() instead. CC: Cesar Miquel <miquel@df.uba.ar> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/misc/rio500.c')
-rw-r--r--drivers/usb/misc/rio500.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/drivers/usb/misc/rio500.c b/drivers/usb/misc/rio500.c
index 487a8ce0775e..cb55dc5330df 100644
--- a/drivers/usb/misc/rio500.c
+++ b/drivers/usb/misc/rio500.c
@@ -171,7 +171,9 @@ static long ioctl_rio(struct file *file, unsigned int cmd, unsigned long arg)
171 if (result == -ETIMEDOUT) 171 if (result == -ETIMEDOUT)
172 retries--; 172 retries--;
173 else if (result < 0) { 173 else if (result < 0) {
174 err("Error executing ioctrl. code = %d", result); 174 dev_err(&rio->rio_dev->dev,
175 "Error executing ioctrl. code = %d\n",
176 result);
175 retries = 0; 177 retries = 0;
176 } else { 178 } else {
177 dbg("Executed ioctl. Result = %d (data=%02x)", 179 dbg("Executed ioctl. Result = %d (data=%02x)",
@@ -238,7 +240,9 @@ static long ioctl_rio(struct file *file, unsigned int cmd, unsigned long arg)
238 if (result == -ETIMEDOUT) 240 if (result == -ETIMEDOUT)
239 retries--; 241 retries--;
240 else if (result < 0) { 242 else if (result < 0) {
241 err("Error executing ioctrl. code = %d", result); 243 dev_err(&rio->rio_dev->dev,
244 "Error executing ioctrl. code = %d\n",
245 result);
242 retries = 0; 246 retries = 0;
243 } else { 247 } else {
244 dbg("Executed ioctl. Result = %d", result); 248 dbg("Executed ioctl. Result = %d", result);
@@ -332,7 +336,8 @@ write_rio(struct file *file, const char __user *buffer,
332 break; 336 break;
333 }; 337 };
334 if (result) { 338 if (result) {
335 err("Write Whoops - %x", result); 339 dev_err(&rio->rio_dev->dev, "Write Whoops - %x\n",
340 result);
336 errn = -EIO; 341 errn = -EIO;
337 goto error; 342 goto error;
338 } 343 }
@@ -401,7 +406,8 @@ read_rio(struct file *file, char __user *buffer, size_t count, loff_t * ppos)
401 } else if (result == -ETIMEDOUT || result == 15) { /* FIXME: 15 ??? */ 406 } else if (result == -ETIMEDOUT || result == 15) { /* FIXME: 15 ??? */
402 if (!maxretry--) { 407 if (!maxretry--) {
403 mutex_unlock(&(rio->lock)); 408 mutex_unlock(&(rio->lock));
404 err("read_rio: maxretry timeout"); 409 dev_err(&rio->rio_dev->dev,
410 "read_rio: maxretry timeout\n");
405 return -ETIME; 411 return -ETIME;
406 } 412 }
407 prepare_to_wait(&rio->wait_q, &wait, TASK_INTERRUPTIBLE); 413 prepare_to_wait(&rio->wait_q, &wait, TASK_INTERRUPTIBLE);
@@ -410,8 +416,9 @@ read_rio(struct file *file, char __user *buffer, size_t count, loff_t * ppos)
410 continue; 416 continue;
411 } else if (result != -EREMOTEIO) { 417 } else if (result != -EREMOTEIO) {
412 mutex_unlock(&(rio->lock)); 418 mutex_unlock(&(rio->lock));
413 err("Read Whoops - result:%u partial:%u this_read:%u", 419 dev_err(&rio->rio_dev->dev,
414 result, partial, this_read); 420 "Read Whoops - result:%u partial:%u this_read:%u\n",
421 result, partial, this_read);
415 return -EIO; 422 return -EIO;
416 } else { 423 } else {
417 mutex_unlock(&(rio->lock)); 424 mutex_unlock(&(rio->lock));
@@ -459,21 +466,24 @@ static int probe_rio(struct usb_interface *intf,
459 466
460 retval = usb_register_dev(intf, &usb_rio_class); 467 retval = usb_register_dev(intf, &usb_rio_class);
461 if (retval) { 468 if (retval) {
462 err("Not able to get a minor for this device."); 469 dev_err(&dev->dev,
470 "Not able to get a minor for this device.\n");
463 return -ENOMEM; 471 return -ENOMEM;
464 } 472 }
465 473
466 rio->rio_dev = dev; 474 rio->rio_dev = dev;
467 475
468 if (!(rio->obuf = kmalloc(OBUF_SIZE, GFP_KERNEL))) { 476 if (!(rio->obuf = kmalloc(OBUF_SIZE, GFP_KERNEL))) {
469 err("probe_rio: Not enough memory for the output buffer"); 477 dev_err(&dev->dev,
478 "probe_rio: Not enough memory for the output buffer\n");
470 usb_deregister_dev(intf, &usb_rio_class); 479 usb_deregister_dev(intf, &usb_rio_class);
471 return -ENOMEM; 480 return -ENOMEM;
472 } 481 }
473 dbg("probe_rio: obuf address:%p", rio->obuf); 482 dbg("probe_rio: obuf address:%p", rio->obuf);
474 483
475 if (!(rio->ibuf = kmalloc(IBUF_SIZE, GFP_KERNEL))) { 484 if (!(rio->ibuf = kmalloc(IBUF_SIZE, GFP_KERNEL))) {
476 err("probe_rio: Not enough memory for the input buffer"); 485 dev_err(&dev->dev,
486 "probe_rio: Not enough memory for the input buffer\n");
477 usb_deregister_dev(intf, &usb_rio_class); 487 usb_deregister_dev(intf, &usb_rio_class);
478 kfree(rio->obuf); 488 kfree(rio->obuf);
479 return -ENOMEM; 489 return -ENOMEM;