Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 82211
b: refs/heads/master
c: 0027492
h: refs/heads/master
i:
  82209: 6814826
  82207: 2494593
v: v3
  • Loading branch information
David Brownell authored and Greg Kroah-Hartman committed Feb 1, 2008
1 parent bede2cc commit e99c1e6
Show file tree
Hide file tree
Showing 15 changed files with 152 additions and 172 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 269954e542328f014fc07fbb0a986192f7a1cced
refs/heads/master: 00274921a052d3232d9f00856387fb269ac0af11
13 changes: 4 additions & 9 deletions trunk/drivers/usb/gadget/at91_udc.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,6 @@ struct at91_request {

/*-------------------------------------------------------------------------*/

#ifdef DEBUG
#define DBG(stuff...) printk(KERN_DEBUG "udc: " stuff)
#else
#define DBG(stuff...) do{}while(0)
#endif

#ifdef VERBOSE
# define VDBG DBG
#else
Expand All @@ -176,9 +170,10 @@ struct at91_request {
# define PACKET(stuff...) do{}while(0)
#endif

#define ERR(stuff...) printk(KERN_ERR "udc: " stuff)
#define WARN(stuff...) printk(KERN_WARNING "udc: " stuff)
#define INFO(stuff...) printk(KERN_INFO "udc: " stuff)
#define ERR(stuff...) pr_err("udc: " stuff)
#define WARN(stuff...) pr_warning("udc: " stuff)
#define INFO(stuff...) pr_info("udc: " stuff)
#define DBG(stuff...) pr_debug("udc: " stuff)

#endif

11 changes: 4 additions & 7 deletions trunk/drivers/usb/gadget/atmel_usba_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1384,8 +1384,7 @@ static int handle_ep0_setup(struct usba_udc *udc, struct usba_ep *ep,
return retval;

stall:
printk(KERN_ERR
"udc: %s: Invalid setup request: %02x.%02x v%04x i%04x l%d, "
pr_err("udc: %s: Invalid setup request: %02x.%02x v%04x i%04x l%d, "
"halting endpoint...\n",
ep->ep.name, crq->bRequestType, crq->bRequest,
le16_to_cpu(crq->wValue), le16_to_cpu(crq->wIndex),
Expand Down Expand Up @@ -1456,8 +1455,7 @@ static void usba_control_irq(struct usba_udc *udc, struct usba_ep *ep)
set_protocol_stall(udc, ep);
break;
default:
printk(KERN_ERR
"udc: %s: TXCOMP: Invalid endpoint state %d, "
pr_err("udc: %s: TXCOMP: Invalid endpoint state %d, "
"halting endpoint...\n",
ep->ep.name, ep->state);
set_protocol_stall(udc, ep);
Expand Down Expand Up @@ -1486,8 +1484,7 @@ static void usba_control_irq(struct usba_udc *udc, struct usba_ep *ep)
default:
usba_ep_writel(ep, CLR_STA, USBA_RX_BK_RDY);
usba_ep_writel(ep, CTL_DIS, USBA_RX_BK_RDY);
printk(KERN_ERR
"udc: %s: RXRDY: Invalid endpoint state %d, "
pr_err("udc: %s: RXRDY: Invalid endpoint state %d, "
"halting endpoint...\n",
ep->ep.name, ep->state);
set_protocol_stall(udc, ep);
Expand Down Expand Up @@ -1532,7 +1529,7 @@ static void usba_control_irq(struct usba_udc *udc, struct usba_ep *ep)
pkt_len = USBA_BFEXT(BYTE_COUNT, usba_ep_readl(ep, STA));
DBG(DBG_HW, "Packet length: %u\n", pkt_len);
if (pkt_len != sizeof(crq)) {
printk(KERN_WARNING "udc: Invalid packet length %u "
pr_warning("udc: Invalid packet length %u "
"(expected %lu)\n", pkt_len, sizeof(crq));
set_protocol_stall(udc, ep);
return;
Expand Down
7 changes: 2 additions & 5 deletions trunk/drivers/usb/gadget/atmel_usba_udc.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@
#define FIFO_IOMEM_ID 0
#define CTRL_IOMEM_ID 1

#ifdef DEBUG
#define DBG_ERR 0x0001 /* report all error returns */
#define DBG_HW 0x0002 /* debug hardware initialization */
#define DBG_GADGET 0x0004 /* calls to/from gadget driver */
Expand All @@ -230,14 +229,12 @@
#define DBG_NONE 0x0000

#define DEBUG_LEVEL (DBG_ERR)

#define DBG(level, fmt, ...) \
do { \
if ((level) & DEBUG_LEVEL) \
printk(KERN_DEBUG "udc: " fmt, ## __VA_ARGS__); \
pr_debug("udc: " fmt, ## __VA_ARGS__); \
} while (0)
#else
#define DBG(level, fmt...)
#endif

enum usba_ctrl_state {
WAIT_FOR_SETUP,
Expand Down
14 changes: 5 additions & 9 deletions trunk/drivers/usb/gadget/file_storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,19 +275,15 @@ MODULE_LICENSE("Dual BSD/GPL");

/*-------------------------------------------------------------------------*/

#ifdef DEBUG
#define LDBG(lun,fmt,args...) \
dev_dbg(&(lun)->dev , fmt , ## args)
#define MDBG(fmt,args...) \
printk(KERN_DEBUG DRIVER_NAME ": " fmt , ## args)
#else
#define LDBG(lun,fmt,args...) \
do { } while (0)
#define MDBG(fmt,args...) \
do { } while (0)
pr_debug(DRIVER_NAME ": " fmt , ## args)

#ifndef DEBUG
#undef VERBOSE_DEBUG
#undef DUMP_MSGS
#endif /* DEBUG */
#endif /* !DEBUG */

#ifdef VERBOSE_DEBUG
#define VLDBG LDBG
Expand All @@ -304,7 +300,7 @@ MODULE_LICENSE("Dual BSD/GPL");
dev_info(&(lun)->dev , fmt , ## args)

#define MINFO(fmt,args...) \
printk(KERN_INFO DRIVER_NAME ": " fmt , ## args)
pr_info(DRIVER_NAME ": " fmt , ## args)

#define DBG(d, fmt, args...) \
dev_dbg(&(d)->gadget->dev , fmt , ## args)
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/usb/gadget/fsl_usb2_udc.h
Original file line number Diff line number Diff line change
Expand Up @@ -551,9 +551,9 @@ static void dump_msg(const char *label, const u8 * buf, unsigned int length)
#define VDBG(stuff...) do{}while(0)
#endif

#define ERR(stuff...) printk(KERN_ERR "udc: " stuff)
#define WARN(stuff...) printk(KERN_WARNING "udc: " stuff)
#define INFO(stuff...) printk(KERN_INFO "udc: " stuff)
#define ERR(stuff...) pr_err("udc: " stuff)
#define WARN(stuff...) pr_warning("udc: " stuff)
#define INFO(stuff...) pr_info("udc: " stuff)

/*-------------------------------------------------------------------------*/

Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/usb/gadget/gmidi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,7 @@ static int __devinit gmidi_bind(struct usb_gadget *gadget)
/* support optional vendor/distro customization */
if (idVendor) {
if (!idProduct) {
printk(KERN_ERR "idVendor needs idProduct!\n");
pr_err("idVendor needs idProduct!\n");
return -ENODEV;
}
device_desc.idVendor = cpu_to_le16(idVendor);
Expand Down Expand Up @@ -1190,7 +1190,7 @@ static int __devinit gmidi_bind(struct usb_gadget *gadget)
in_ep = usb_ep_autoconfig(gadget, &bulk_in_desc);
if (!in_ep) {
autoconf_fail:
printk(KERN_ERR "%s: can't autoconfigure on %s\n",
pr_err("%s: can't autoconfigure on %s\n",
shortname, gadget->name);
return -ENODEV;
}
Expand All @@ -1212,7 +1212,7 @@ static int __devinit gmidi_bind(struct usb_gadget *gadget)
* it SHOULD NOT have problems with bulk-capable hardware.
* so warn about unrecognized controllers, don't panic.
*/
printk(KERN_WARNING "%s: controller '%s' not recognized\n",
pr_warning("%s: controller '%s' not recognized\n",
shortname, gadget->name);
device_desc.bcdDevice = __constant_cpu_to_le16(0x9999);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/usb/gadget/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1699,7 +1699,7 @@ gadgetfs_bind (struct usb_gadget *gadget)
if (!dev)
return -ESRCH;
if (0 != strcmp (CHIP, gadget->name)) {
printk (KERN_ERR "%s expected %s controller not %s\n",
pr_err("%s expected %s controller not %s\n",
shortname, CHIP, gadget->name);
return -ENODEV;
}
Expand Down
48 changes: 24 additions & 24 deletions trunk/drivers/usb/gadget/m66592-udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ static inline u16 control_reg_get_pid(struct m66592 *m66592, u16 pipenum)
offset = get_pipectr_addr(pipenum);
pid = m66592_read(m66592, offset) & M66592_PID;
} else
printk(KERN_ERR "unexpect pipe num (%d)\n", pipenum);
pr_err("unexpect pipe num (%d)\n", pipenum);

return pid;
}
Expand All @@ -163,7 +163,7 @@ static inline void control_reg_set_pid(struct m66592 *m66592, u16 pipenum,
offset = get_pipectr_addr(pipenum);
m66592_mdfy(m66592, pid, M66592_PID, offset);
} else
printk(KERN_ERR "unexpect pipe num (%d)\n", pipenum);
pr_err("unexpect pipe num (%d)\n", pipenum);
}

static inline void pipe_start(struct m66592 *m66592, u16 pipenum)
Expand Down Expand Up @@ -192,7 +192,7 @@ static inline u16 control_reg_get(struct m66592 *m66592, u16 pipenum)
offset = get_pipectr_addr(pipenum);
ret = m66592_read(m66592, offset);
} else
printk(KERN_ERR "unexpect pipe num (%d)\n", pipenum);
pr_err("unexpect pipe num (%d)\n", pipenum);

return ret;
}
Expand All @@ -209,7 +209,7 @@ static inline void control_reg_sqclr(struct m66592 *m66592, u16 pipenum)
offset = get_pipectr_addr(pipenum);
m66592_bset(m66592, M66592_SQCLR, offset);
} else
printk(KERN_ERR "unexpect pipe num(%d)\n", pipenum);
pr_err("unexpect pipe num(%d)\n", pipenum);
}

static inline int get_buffer_size(struct m66592 *m66592, u16 pipenum)
Expand Down Expand Up @@ -291,7 +291,7 @@ static int pipe_buffer_setting(struct m66592 *m66592,
break;
}
if (m66592->bi_bufnum > M66592_MAX_BUFNUM) {
printk(KERN_ERR "m66592 pipe memory is insufficient(%d)\n",
pr_err("m66592 pipe memory is insufficient(%d)\n",
m66592->bi_bufnum);
return -ENOMEM;
}
Expand Down Expand Up @@ -332,7 +332,7 @@ static void pipe_buffer_release(struct m66592 *m66592,
if (info->type == M66592_BULK)
m66592->bulk--;
} else
printk(KERN_ERR "ep_release: unexpect pipenum (%d)\n",
pr_err("ep_release: unexpect pipenum (%d)\n",
info->pipe);
}

Expand Down Expand Up @@ -430,7 +430,7 @@ static int alloc_pipe_config(struct m66592_ep *ep,
case USB_ENDPOINT_XFER_BULK:
if (m66592->bulk >= M66592_MAX_NUM_BULK) {
if (m66592->isochronous >= M66592_MAX_NUM_ISOC) {
printk(KERN_ERR "bulk pipe is insufficient\n");
pr_err("bulk pipe is insufficient\n");
return -ENODEV;
} else {
info.pipe = M66592_BASE_PIPENUM_ISOC
Expand All @@ -446,7 +446,7 @@ static int alloc_pipe_config(struct m66592_ep *ep,
break;
case USB_ENDPOINT_XFER_INT:
if (m66592->interrupt >= M66592_MAX_NUM_INT) {
printk(KERN_ERR "interrupt pipe is insufficient\n");
pr_err("interrupt pipe is insufficient\n");
return -ENODEV;
}
info.pipe = M66592_BASE_PIPENUM_INT + m66592->interrupt;
Expand All @@ -455,15 +455,15 @@ static int alloc_pipe_config(struct m66592_ep *ep,
break;
case USB_ENDPOINT_XFER_ISOC:
if (m66592->isochronous >= M66592_MAX_NUM_ISOC) {
printk(KERN_ERR "isochronous pipe is insufficient\n");
pr_err("isochronous pipe is insufficient\n");
return -ENODEV;
}
info.pipe = M66592_BASE_PIPENUM_ISOC + m66592->isochronous;
info.type = M66592_ISO;
counter = &m66592->isochronous;
break;
default:
printk(KERN_ERR "unexpect xfer type\n");
pr_err("unexpect xfer type\n");
return -EINVAL;
}
ep->type = info.type;
Expand All @@ -478,7 +478,7 @@ static int alloc_pipe_config(struct m66592_ep *ep,

ret = pipe_buffer_setting(m66592, &info);
if (ret < 0) {
printk(KERN_ERR "pipe_buffer_setting fail\n");
pr_err("pipe_buffer_setting fail\n");
return ret;
}

Expand Down Expand Up @@ -614,7 +614,7 @@ static void start_ep0(struct m66592_ep *ep, struct m66592_request *req)
control_end(ep->m66592, 0);
break;
default:
printk(KERN_ERR "start_ep0: unexpect ctsq(%x)\n", ctsq);
pr_err("start_ep0: unexpect ctsq(%x)\n", ctsq);
break;
}
}
Expand Down Expand Up @@ -748,7 +748,7 @@ static void irq_ep0_write(struct m66592_ep *ep, struct m66592_request *req)
do {
tmp = m66592_read(m66592, ep->fifoctr);
if (i++ > 100000) {
printk(KERN_ERR "pipe0 is busy. maybe cpu i/o bus "
pr_err("pipe0 is busy. maybe cpu i/o bus "
"conflict. please power off this controller.");
return;
}
Expand Down Expand Up @@ -798,7 +798,7 @@ static void irq_packet_write(struct m66592_ep *ep, struct m66592_request *req)
if (unlikely((tmp & M66592_FRDY) == 0)) {
pipe_stop(m66592, pipenum);
pipe_irq_disable(m66592, pipenum);
printk(KERN_ERR "write fifo not ready. pipnum=%d\n", pipenum);
pr_err("write fifo not ready. pipnum=%d\n", pipenum);
return;
}

Expand Down Expand Up @@ -847,7 +847,7 @@ static void irq_packet_read(struct m66592_ep *ep, struct m66592_request *req)
req->req.status = -EPIPE;
pipe_stop(m66592, pipenum);
pipe_irq_disable(m66592, pipenum);
printk(KERN_ERR "read fifo not ready");
pr_err("read fifo not ready");
return;
}

Expand Down Expand Up @@ -1102,7 +1102,7 @@ static void m66592_update_usb_speed(struct m66592 *m66592)
break;
default:
m66592->gadget.speed = USB_SPEED_UNKNOWN;
printk(KERN_ERR "USB speed unknown\n");
pr_err("USB speed unknown\n");
}
}

Expand Down Expand Up @@ -1161,7 +1161,7 @@ __acquires(m66592->lock)
control_end(m66592, 0);
break;
default:
printk(KERN_ERR "ctrl_stage: unexpect ctsq(%x)\n", ctsq);
pr_err("ctrl_stage: unexpect ctsq(%x)\n", ctsq);
break;
}
}
Expand Down Expand Up @@ -1461,13 +1461,13 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)

retval = device_add(&m66592->gadget.dev);
if (retval) {
printk(KERN_ERR "device_add error (%d)\n", retval);
pr_err("device_add error (%d)\n", retval);
goto error;
}

retval = driver->bind (&m66592->gadget);
if (retval) {
printk(KERN_ERR "bind to driver error (%d)\n", retval);
pr_err("bind to driver error (%d)\n", retval);
device_del(&m66592->gadget.dev);
goto error;
}
Expand Down Expand Up @@ -1561,28 +1561,28 @@ static int __init m66592_probe(struct platform_device *pdev)
(char *)udc_name);
if (!res) {
ret = -ENODEV;
printk(KERN_ERR "platform_get_resource_byname error.\n");
pr_err("platform_get_resource_byname error.\n");
goto clean_up;
}

irq = platform_get_irq(pdev, 0);
if (irq < 0) {
ret = -ENODEV;
printk(KERN_ERR "platform_get_irq error.\n");
pr_err("platform_get_irq error.\n");
goto clean_up;
}

reg = ioremap(res->start, resource_len(res));
if (reg == NULL) {
ret = -ENOMEM;
printk(KERN_ERR "ioremap error.\n");
pr_err("ioremap error.\n");
goto clean_up;
}

/* initialize ucd */
m66592 = kzalloc(sizeof(struct m66592), GFP_KERNEL);
if (m66592 == NULL) {
printk(KERN_ERR "kzalloc error\n");
pr_err("kzalloc error\n");
goto clean_up;
}

Expand All @@ -1608,7 +1608,7 @@ static int __init m66592_probe(struct platform_device *pdev)
ret = request_irq(irq, m66592_irq, IRQF_DISABLED | IRQF_SHARED,
udc_name, m66592);
if (ret < 0) {
printk(KERN_ERR "request_irq error (%d)\n", ret);
pr_err("request_irq error (%d)\n", ret);
goto clean_up;
}

Expand Down
Loading

0 comments on commit e99c1e6

Please sign in to comment.