Clarify messages referencing "request urb" to mean "tx urb" (host transmit/send (to mceusb device)). Qualify messages referencing plain "urb" to mean "rx urb" (host receive (from mceusb device)). Add missing "couldn't allocate rx urb" error message. Clean extraneous "\n" in dev_dbg messages. Signed-off-by: A Sun <as1033x@xxxxxxxxxxx> --- drivers/media/rc/mceusb.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c index 0cd8f6f57..efffb1795 100644 --- a/drivers/media/rc/mceusb.c +++ b/drivers/media/rc/mceusb.c @@ -796,13 +796,13 @@ static void mce_async_callback(struct urb *urb) break; case -EPIPE: - dev_err(ir->dev, "Error: request urb status = %d (TX HALT)", + dev_err(ir->dev, "Error: tx urb status = %d (TX HALT)", urb->status); mceusb_defer_kevent(ir, EVENT_TX_HALT); break; default: - dev_err(ir->dev, "Error: request urb status = %d", urb->status); + dev_err(ir->dev, "Error: tx urb status = %d", urb->status); break; } @@ -822,7 +822,7 @@ static void mce_request_packet(struct mceusb_dev *ir, unsigned char *data, async_urb = usb_alloc_urb(0, GFP_KERNEL); if (unlikely(!async_urb)) { - dev_err(dev, "Error, couldn't allocate urb!"); + dev_err(dev, "Error: couldn't allocate tx urb!"); return; } @@ -1268,13 +1268,13 @@ static void mceusb_dev_recv(struct urb *urb) return; case -EPIPE: - dev_err(ir->dev, "Error: urb status = %d (RX HALT)", + dev_err(ir->dev, "Error: rx urb status = %d (RX HALT)", urb->status); mceusb_defer_kevent(ir, EVENT_RX_HALT); return; default: - dev_err(ir->dev, "Error: urb status = %d", urb->status); + dev_err(ir->dev, "Error: rx urb status = %d", urb->status); break; } @@ -1544,27 +1544,27 @@ static int mceusb_dev_probe(struct usb_interface *intf, if (ep_in == NULL) { if (usb_endpoint_is_bulk_in(ep)) { ep_in = ep; - dev_dbg(&intf->dev, "acceptable bulk inbound endpoint found\n"); + dev_dbg(&intf->dev, "acceptable bulk inbound endpoint found"); } else if (usb_endpoint_is_int_in(ep)) { ep_in = ep; ep_in->bInterval = 1; - dev_dbg(&intf->dev, "acceptable interrupt inbound endpoint found\n"); + dev_dbg(&intf->dev, "acceptable interrupt inbound endpoint found"); } } if (ep_out == NULL) { if (usb_endpoint_is_bulk_out(ep)) { ep_out = ep; - dev_dbg(&intf->dev, "acceptable bulk outbound endpoint found\n"); + dev_dbg(&intf->dev, "acceptable bulk outbound endpoint found"); } else if (usb_endpoint_is_int_out(ep)) { ep_out = ep; ep_out->bInterval = 1; - dev_dbg(&intf->dev, "acceptable interrupt outbound endpoint found\n"); + dev_dbg(&intf->dev, "acceptable interrupt outbound endpoint found"); } } } if (!ep_in || !ep_out) { - dev_dbg(&intf->dev, "required endpoints not found\n"); + dev_dbg(&intf->dev, "required endpoints not found"); return -ENODEV; } @@ -1584,8 +1584,10 @@ static int mceusb_dev_probe(struct usb_interface *intf, goto buf_in_alloc_fail; ir->urb_in = usb_alloc_urb(0, GFP_KERNEL); - if (!ir->urb_in) + if (!ir->urb_in) { + dev_err(&intf->dev, "Error: couldn't allocate rx urb!"); goto urb_in_alloc_fail; + } ir->usbdev = usb_get_dev(dev); ir->dev = &intf->dev; -- 2.11.0