aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/m66592-udc.c
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2007-11-19 15:58:36 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-02-01 17:34:51 -0500
commit00274921a052d3232d9f00856387fb269ac0af11 (patch)
tree20d2baa7234c936b7451d76f6da527d43197f994 /drivers/usb/gadget/m66592-udc.c
parent269954e542328f014fc07fbb0a986192f7a1cced (diff)
USB: gadget code switches to pr_err() and friends
We now have pr_err(), pr_warning(), and friends ... start using them in the gadget stack instead of printk(KERN_ERR) and friends. This gives us shorter lines and somewhat increased readability. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/m66592-udc.c')
-rw-r--r--drivers/usb/gadget/m66592-udc.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/drivers/usb/gadget/m66592-udc.c b/drivers/usb/gadget/m66592-udc.c
index 478d8349cf00..43f02189dc44 100644
--- a/drivers/usb/gadget/m66592-udc.c
+++ b/drivers/usb/gadget/m66592-udc.c
@@ -147,7 +147,7 @@ static inline u16 control_reg_get_pid(struct m66592 *m66592, u16 pipenum)
147 offset = get_pipectr_addr(pipenum); 147 offset = get_pipectr_addr(pipenum);
148 pid = m66592_read(m66592, offset) & M66592_PID; 148 pid = m66592_read(m66592, offset) & M66592_PID;
149 } else 149 } else
150 printk(KERN_ERR "unexpect pipe num (%d)\n", pipenum); 150 pr_err("unexpect pipe num (%d)\n", pipenum);
151 151
152 return pid; 152 return pid;
153} 153}
@@ -163,7 +163,7 @@ static inline void control_reg_set_pid(struct m66592 *m66592, u16 pipenum,
163 offset = get_pipectr_addr(pipenum); 163 offset = get_pipectr_addr(pipenum);
164 m66592_mdfy(m66592, pid, M66592_PID, offset); 164 m66592_mdfy(m66592, pid, M66592_PID, offset);
165 } else 165 } else
166 printk(KERN_ERR "unexpect pipe num (%d)\n", pipenum); 166 pr_err("unexpect pipe num (%d)\n", pipenum);
167} 167}
168 168
169static inline void pipe_start(struct m66592 *m66592, u16 pipenum) 169static inline void pipe_start(struct m66592 *m66592, u16 pipenum)
@@ -192,7 +192,7 @@ static inline u16 control_reg_get(struct m66592 *m66592, u16 pipenum)
192 offset = get_pipectr_addr(pipenum); 192 offset = get_pipectr_addr(pipenum);
193 ret = m66592_read(m66592, offset); 193 ret = m66592_read(m66592, offset);
194 } else 194 } else
195 printk(KERN_ERR "unexpect pipe num (%d)\n", pipenum); 195 pr_err("unexpect pipe num (%d)\n", pipenum);
196 196
197 return ret; 197 return ret;
198} 198}
@@ -209,7 +209,7 @@ static inline void control_reg_sqclr(struct m66592 *m66592, u16 pipenum)
209 offset = get_pipectr_addr(pipenum); 209 offset = get_pipectr_addr(pipenum);
210 m66592_bset(m66592, M66592_SQCLR, offset); 210 m66592_bset(m66592, M66592_SQCLR, offset);
211 } else 211 } else
212 printk(KERN_ERR "unexpect pipe num(%d)\n", pipenum); 212 pr_err("unexpect pipe num(%d)\n", pipenum);
213} 213}
214 214
215static inline int get_buffer_size(struct m66592 *m66592, u16 pipenum) 215static inline int get_buffer_size(struct m66592 *m66592, u16 pipenum)
@@ -291,7 +291,7 @@ static int pipe_buffer_setting(struct m66592 *m66592,
291 break; 291 break;
292 } 292 }
293 if (m66592->bi_bufnum > M66592_MAX_BUFNUM) { 293 if (m66592->bi_bufnum > M66592_MAX_BUFNUM) {
294 printk(KERN_ERR "m66592 pipe memory is insufficient(%d)\n", 294 pr_err("m66592 pipe memory is insufficient(%d)\n",
295 m66592->bi_bufnum); 295 m66592->bi_bufnum);
296 return -ENOMEM; 296 return -ENOMEM;
297 } 297 }
@@ -332,7 +332,7 @@ static void pipe_buffer_release(struct m66592 *m66592,
332 if (info->type == M66592_BULK) 332 if (info->type == M66592_BULK)
333 m66592->bulk--; 333 m66592->bulk--;
334 } else 334 } else
335 printk(KERN_ERR "ep_release: unexpect pipenum (%d)\n", 335 pr_err("ep_release: unexpect pipenum (%d)\n",
336 info->pipe); 336 info->pipe);
337} 337}
338 338
@@ -430,7 +430,7 @@ static int alloc_pipe_config(struct m66592_ep *ep,
430 case USB_ENDPOINT_XFER_BULK: 430 case USB_ENDPOINT_XFER_BULK:
431 if (m66592->bulk >= M66592_MAX_NUM_BULK) { 431 if (m66592->bulk >= M66592_MAX_NUM_BULK) {
432 if (m66592->isochronous >= M66592_MAX_NUM_ISOC) { 432 if (m66592->isochronous >= M66592_MAX_NUM_ISOC) {
433 printk(KERN_ERR "bulk pipe is insufficient\n"); 433 pr_err("bulk pipe is insufficient\n");
434 return -ENODEV; 434 return -ENODEV;
435 } else { 435 } else {
436 info.pipe = M66592_BASE_PIPENUM_ISOC 436 info.pipe = M66592_BASE_PIPENUM_ISOC
@@ -446,7 +446,7 @@ static int alloc_pipe_config(struct m66592_ep *ep,
446 break; 446 break;
447 case USB_ENDPOINT_XFER_INT: 447 case USB_ENDPOINT_XFER_INT:
448 if (m66592->interrupt >= M66592_MAX_NUM_INT) { 448 if (m66592->interrupt >= M66592_MAX_NUM_INT) {
449 printk(KERN_ERR "interrupt pipe is insufficient\n"); 449 pr_err("interrupt pipe is insufficient\n");
450 return -ENODEV; 450 return -ENODEV;
451 } 451 }
452 info.pipe = M66592_BASE_PIPENUM_INT + m66592->interrupt; 452 info.pipe = M66592_BASE_PIPENUM_INT + m66592->interrupt;
@@ -455,7 +455,7 @@ static int alloc_pipe_config(struct m66592_ep *ep,
455 break; 455 break;
456 case USB_ENDPOINT_XFER_ISOC: 456 case USB_ENDPOINT_XFER_ISOC:
457 if (m66592->isochronous >= M66592_MAX_NUM_ISOC) { 457 if (m66592->isochronous >= M66592_MAX_NUM_ISOC) {
458 printk(KERN_ERR "isochronous pipe is insufficient\n"); 458 pr_err("isochronous pipe is insufficient\n");
459 return -ENODEV; 459 return -ENODEV;
460 } 460 }
461 info.pipe = M66592_BASE_PIPENUM_ISOC + m66592->isochronous; 461 info.pipe = M66592_BASE_PIPENUM_ISOC + m66592->isochronous;
@@ -463,7 +463,7 @@ static int alloc_pipe_config(struct m66592_ep *ep,
463 counter = &m66592->isochronous; 463 counter = &m66592->isochronous;
464 break; 464 break;
465 default: 465 default:
466 printk(KERN_ERR "unexpect xfer type\n"); 466 pr_err("unexpect xfer type\n");
467 return -EINVAL; 467 return -EINVAL;
468 } 468 }
469 ep->type = info.type; 469 ep->type = info.type;
@@ -478,7 +478,7 @@ static int alloc_pipe_config(struct m66592_ep *ep,
478 478
479 ret = pipe_buffer_setting(m66592, &info); 479 ret = pipe_buffer_setting(m66592, &info);
480 if (ret < 0) { 480 if (ret < 0) {
481 printk(KERN_ERR "pipe_buffer_setting fail\n"); 481 pr_err("pipe_buffer_setting fail\n");
482 return ret; 482 return ret;
483 } 483 }
484 484
@@ -614,7 +614,7 @@ static void start_ep0(struct m66592_ep *ep, struct m66592_request *req)
614 control_end(ep->m66592, 0); 614 control_end(ep->m66592, 0);
615 break; 615 break;
616 default: 616 default:
617 printk(KERN_ERR "start_ep0: unexpect ctsq(%x)\n", ctsq); 617 pr_err("start_ep0: unexpect ctsq(%x)\n", ctsq);
618 break; 618 break;
619 } 619 }
620} 620}
@@ -748,7 +748,7 @@ static void irq_ep0_write(struct m66592_ep *ep, struct m66592_request *req)
748 do { 748 do {
749 tmp = m66592_read(m66592, ep->fifoctr); 749 tmp = m66592_read(m66592, ep->fifoctr);
750 if (i++ > 100000) { 750 if (i++ > 100000) {
751 printk(KERN_ERR "pipe0 is busy. maybe cpu i/o bus " 751 pr_err("pipe0 is busy. maybe cpu i/o bus "
752 "conflict. please power off this controller."); 752 "conflict. please power off this controller.");
753 return; 753 return;
754 } 754 }
@@ -798,7 +798,7 @@ static void irq_packet_write(struct m66592_ep *ep, struct m66592_request *req)
798 if (unlikely((tmp & M66592_FRDY) == 0)) { 798 if (unlikely((tmp & M66592_FRDY) == 0)) {
799 pipe_stop(m66592, pipenum); 799 pipe_stop(m66592, pipenum);
800 pipe_irq_disable(m66592, pipenum); 800 pipe_irq_disable(m66592, pipenum);
801 printk(KERN_ERR "write fifo not ready. pipnum=%d\n", pipenum); 801 pr_err("write fifo not ready. pipnum=%d\n", pipenum);
802 return; 802 return;
803 } 803 }
804 804
@@ -847,7 +847,7 @@ static void irq_packet_read(struct m66592_ep *ep, struct m66592_request *req)
847 req->req.status = -EPIPE; 847 req->req.status = -EPIPE;
848 pipe_stop(m66592, pipenum); 848 pipe_stop(m66592, pipenum);
849 pipe_irq_disable(m66592, pipenum); 849 pipe_irq_disable(m66592, pipenum);
850 printk(KERN_ERR "read fifo not ready"); 850 pr_err("read fifo not ready");
851 return; 851 return;
852 } 852 }
853 853
@@ -1102,7 +1102,7 @@ static void m66592_update_usb_speed(struct m66592 *m66592)
1102 break; 1102 break;
1103 default: 1103 default:
1104 m66592->gadget.speed = USB_SPEED_UNKNOWN; 1104 m66592->gadget.speed = USB_SPEED_UNKNOWN;
1105 printk(KERN_ERR "USB speed unknown\n"); 1105 pr_err("USB speed unknown\n");
1106 } 1106 }
1107} 1107}
1108 1108
@@ -1161,7 +1161,7 @@ __acquires(m66592->lock)
1161 control_end(m66592, 0); 1161 control_end(m66592, 0);
1162 break; 1162 break;
1163 default: 1163 default:
1164 printk(KERN_ERR "ctrl_stage: unexpect ctsq(%x)\n", ctsq); 1164 pr_err("ctrl_stage: unexpect ctsq(%x)\n", ctsq);
1165 break; 1165 break;
1166 } 1166 }
1167} 1167}
@@ -1461,13 +1461,13 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
1461 1461
1462 retval = device_add(&m66592->gadget.dev); 1462 retval = device_add(&m66592->gadget.dev);
1463 if (retval) { 1463 if (retval) {
1464 printk(KERN_ERR "device_add error (%d)\n", retval); 1464 pr_err("device_add error (%d)\n", retval);
1465 goto error; 1465 goto error;
1466 } 1466 }
1467 1467
1468 retval = driver->bind (&m66592->gadget); 1468 retval = driver->bind (&m66592->gadget);
1469 if (retval) { 1469 if (retval) {
1470 printk(KERN_ERR "bind to driver error (%d)\n", retval); 1470 pr_err("bind to driver error (%d)\n", retval);
1471 device_del(&m66592->gadget.dev); 1471 device_del(&m66592->gadget.dev);
1472 goto error; 1472 goto error;
1473 } 1473 }
@@ -1561,28 +1561,28 @@ static int __init m66592_probe(struct platform_device *pdev)
1561 (char *)udc_name); 1561 (char *)udc_name);
1562 if (!res) { 1562 if (!res) {
1563 ret = -ENODEV; 1563 ret = -ENODEV;
1564 printk(KERN_ERR "platform_get_resource_byname error.\n"); 1564 pr_err("platform_get_resource_byname error.\n");
1565 goto clean_up; 1565 goto clean_up;
1566 } 1566 }
1567 1567
1568 irq = platform_get_irq(pdev, 0); 1568 irq = platform_get_irq(pdev, 0);
1569 if (irq < 0) { 1569 if (irq < 0) {
1570 ret = -ENODEV; 1570 ret = -ENODEV;
1571 printk(KERN_ERR "platform_get_irq error.\n"); 1571 pr_err("platform_get_irq error.\n");
1572 goto clean_up; 1572 goto clean_up;
1573 } 1573 }
1574 1574
1575 reg = ioremap(res->start, resource_len(res)); 1575 reg = ioremap(res->start, resource_len(res));
1576 if (reg == NULL) { 1576 if (reg == NULL) {
1577 ret = -ENOMEM; 1577 ret = -ENOMEM;
1578 printk(KERN_ERR "ioremap error.\n"); 1578 pr_err("ioremap error.\n");
1579 goto clean_up; 1579 goto clean_up;
1580 } 1580 }
1581 1581
1582 /* initialize ucd */ 1582 /* initialize ucd */
1583 m66592 = kzalloc(sizeof(struct m66592), GFP_KERNEL); 1583 m66592 = kzalloc(sizeof(struct m66592), GFP_KERNEL);
1584 if (m66592 == NULL) { 1584 if (m66592 == NULL) {
1585 printk(KERN_ERR "kzalloc error\n"); 1585 pr_err("kzalloc error\n");
1586 goto clean_up; 1586 goto clean_up;
1587 } 1587 }
1588 1588
@@ -1608,7 +1608,7 @@ static int __init m66592_probe(struct platform_device *pdev)
1608 ret = request_irq(irq, m66592_irq, IRQF_DISABLED | IRQF_SHARED, 1608 ret = request_irq(irq, m66592_irq, IRQF_DISABLED | IRQF_SHARED,
1609 udc_name, m66592); 1609 udc_name, m66592);
1610 if (ret < 0) { 1610 if (ret < 0) {
1611 printk(KERN_ERR "request_irq error (%d)\n", ret); 1611 pr_err("request_irq error (%d)\n", ret);
1612 goto clean_up; 1612 goto clean_up;
1613 } 1613 }
1614 1614