Commit e1a344d3 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a341c6b2
...@@ -153,10 +153,10 @@ static long ioctl_rio(struct file *file, unsigned int cmd, unsigned long arg) ...@@ -153,10 +153,10 @@ static long ioctl_rio(struct file *file, unsigned int cmd, unsigned long arg)
requesttype = rio_cmd.requesttype | USB_DIR_IN | requesttype = rio_cmd.requesttype | USB_DIR_IN |
USB_TYPE_VENDOR | USB_RECIP_DEVICE; USB_TYPE_VENDOR | USB_RECIP_DEVICE;
dbg dev_dbg(&rio->rio_dev->dev,
("sending command:reqtype=%0x req=%0x value=%0x index=%0x len=%0x", "sending command:reqtype=%0x req=%0x value=%0x index=%0x len=%0x\n",
requesttype, rio_cmd.request, rio_cmd.value, requesttype, rio_cmd.request, rio_cmd.value,
rio_cmd.index, rio_cmd.length); rio_cmd.index, rio_cmd.length);
/* Send rio control message */ /* Send rio control message */
retries = 3; retries = 3;
while (retries) { while (retries) {
...@@ -176,8 +176,9 @@ static long ioctl_rio(struct file *file, unsigned int cmd, unsigned long arg) ...@@ -176,8 +176,9 @@ static long ioctl_rio(struct file *file, unsigned int cmd, unsigned long arg)
result); result);
retries = 0; retries = 0;
} else { } else {
dbg("Executed ioctl. Result = %d (data=%02x)", dev_dbg(&rio->rio_dev->dev,
result, buffer[0]); "Executed ioctl. Result = %d (data=%02x)\n",
result, buffer[0]);
if (copy_to_user(rio_cmd.buffer, buffer, if (copy_to_user(rio_cmd.buffer, buffer,
rio_cmd.length)) { rio_cmd.length)) {
free_page((unsigned long) buffer); free_page((unsigned long) buffer);
...@@ -223,9 +224,10 @@ static long ioctl_rio(struct file *file, unsigned int cmd, unsigned long arg) ...@@ -223,9 +224,10 @@ static long ioctl_rio(struct file *file, unsigned int cmd, unsigned long arg)
requesttype = rio_cmd.requesttype | USB_DIR_OUT | requesttype = rio_cmd.requesttype | USB_DIR_OUT |
USB_TYPE_VENDOR | USB_RECIP_DEVICE; USB_TYPE_VENDOR | USB_RECIP_DEVICE;
dbg("sending command: reqtype=%0x req=%0x value=%0x index=%0x len=%0x", dev_dbg(&rio->rio_dev->dev,
requesttype, rio_cmd.request, rio_cmd.value, "sending command: reqtype=%0x req=%0x value=%0x index=%0x len=%0x\n",
rio_cmd.index, rio_cmd.length); requesttype, rio_cmd.request, rio_cmd.value,
rio_cmd.index, rio_cmd.length);
/* Send rio control message */ /* Send rio control message */
retries = 3; retries = 3;
while (retries) { while (retries) {
...@@ -245,7 +247,8 @@ static long ioctl_rio(struct file *file, unsigned int cmd, unsigned long arg) ...@@ -245,7 +247,8 @@ static long ioctl_rio(struct file *file, unsigned int cmd, unsigned long arg)
result); result);
retries = 0; retries = 0;
} else { } else {
dbg("Executed ioctl. Result = %d", result); dev_dbg(&rio->rio_dev->dev,
"Executed ioctl. Result = %d\n", result);
retries = 0; retries = 0;
} }
...@@ -317,8 +320,9 @@ write_rio(struct file *file, const char __user *buffer, ...@@ -317,8 +320,9 @@ write_rio(struct file *file, const char __user *buffer,
usb_sndbulkpipe(rio->rio_dev, 2), usb_sndbulkpipe(rio->rio_dev, 2),
obuf, thistime, &partial, 5000); obuf, thistime, &partial, 5000);
dbg("write stats: result:%d thistime:%lu partial:%u", dev_dbg(&rio->rio_dev->dev,
result, thistime, partial); "write stats: result:%d thistime:%lu partial:%u\n",
result, thistime, partial);
if (result == -ETIMEDOUT) { /* NAK - so hold for a while */ if (result == -ETIMEDOUT) { /* NAK - so hold for a while */
if (!maxretry--) { if (!maxretry--) {
...@@ -398,8 +402,9 @@ read_rio(struct file *file, char __user *buffer, size_t count, loff_t * ppos) ...@@ -398,8 +402,9 @@ read_rio(struct file *file, char __user *buffer, size_t count, loff_t * ppos)
ibuf, this_read, &partial, ibuf, this_read, &partial,
8000); 8000);
dbg("read stats: result:%d this_read:%u partial:%u", dev_dbg(&rio->rio_dev->dev,
result, this_read, partial); "read stats: result:%d this_read:%u partial:%u\n",
result, this_read, partial);
if (partial) { if (partial) {
count = this_read = partial; count = this_read = partial;
...@@ -479,7 +484,7 @@ static int probe_rio(struct usb_interface *intf, ...@@ -479,7 +484,7 @@ static int probe_rio(struct usb_interface *intf,
usb_deregister_dev(intf, &usb_rio_class); usb_deregister_dev(intf, &usb_rio_class);
return -ENOMEM; return -ENOMEM;
} }
dbg("probe_rio: obuf address:%p", rio->obuf); dev_dbg(&intf->dev, "obuf address:%p\n", rio->obuf);
if (!(rio->ibuf = kmalloc(IBUF_SIZE, GFP_KERNEL))) { if (!(rio->ibuf = kmalloc(IBUF_SIZE, GFP_KERNEL))) {
dev_err(&dev->dev, dev_err(&dev->dev,
...@@ -488,7 +493,7 @@ static int probe_rio(struct usb_interface *intf, ...@@ -488,7 +493,7 @@ static int probe_rio(struct usb_interface *intf,
kfree(rio->obuf); kfree(rio->obuf);
return -ENOMEM; return -ENOMEM;
} }
dbg("probe_rio: ibuf address:%p", rio->ibuf); dev_dbg(&intf->dev, "ibuf address:%p\n", rio->ibuf);
mutex_init(&(rio->lock)); mutex_init(&(rio->lock));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment