From 495f71e2b95d30198314e6e358987f8effbefcc9 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 25 Apr 2012 12:37:48 -0700 Subject: [PATCH] USB: ipheth.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. Signed-off-by: Greg Kroah-Hartman --- drivers/net/usb/ipheth.c | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/drivers/net/usb/ipheth.c b/drivers/net/usb/ipheth.c index dd78c4cbd459..32519e5a7b97 100644 --- a/drivers/net/usb/ipheth.c +++ b/drivers/net/usb/ipheth.c @@ -209,7 +209,8 @@ static void ipheth_rcvbulk_callback(struct urb *urb) case 0: break; default: - err("%s: urb status: %d", __func__, status); + dev_err(&dev->intf->dev, "%s: urb status: %d\n", + __func__, status); return; } @@ -222,7 +223,8 @@ static void ipheth_rcvbulk_callback(struct urb *urb) skb = dev_alloc_skb(len); if (!skb) { - err("%s: dev_alloc_skb: -ENOMEM", __func__); + dev_err(&dev->intf->dev, "%s: dev_alloc_skb: -ENOMEM\n", + __func__); dev->net->stats.rx_dropped++; return; } @@ -251,7 +253,8 @@ static void ipheth_sndbulk_callback(struct urb *urb) status != -ENOENT && status != -ECONNRESET && status != -ESHUTDOWN) - err("%s: urb status: %d", __func__, status); + dev_err(&dev->intf->dev, "%s: urb status: %d\n", + __func__, status); dev_kfree_skb_irq(dev->tx_skb); netif_wake_queue(dev->net); @@ -271,7 +274,8 @@ static int ipheth_carrier_set(struct ipheth_device *dev) dev->ctrl_buf, IPHETH_CTRL_BUF_SIZE, IPHETH_CTRL_TIMEOUT); if (retval < 0) { - err("%s: usb_control_msg: %d", __func__, retval); + dev_err(&dev->intf->dev, "%s: usb_control_msg: %d\n", + __func__, retval); return retval; } @@ -308,9 +312,11 @@ static int ipheth_get_macaddr(struct ipheth_device *dev) IPHETH_CTRL_BUF_SIZE, IPHETH_CTRL_TIMEOUT); if (retval < 0) { - err("%s: usb_control_msg: %d", __func__, retval); + dev_err(&dev->intf->dev, "%s: usb_control_msg: %d\n", + __func__, retval); } else if (retval < ETH_ALEN) { - err("%s: usb_control_msg: short packet: %d bytes", + dev_err(&dev->intf->dev, + "%s: usb_control_msg: short packet: %d bytes\n", __func__, retval); retval = -EINVAL; } else { @@ -335,7 +341,8 @@ static int ipheth_rx_submit(struct ipheth_device *dev, gfp_t mem_flags) retval = usb_submit_urb(dev->rx_urb, mem_flags); if (retval) - err("%s: usb_submit_urb: %d", __func__, retval); + dev_err(&dev->intf->dev, "%s: usb_submit_urb: %d\n", + __func__, retval); return retval; } @@ -396,7 +403,8 @@ static int ipheth_tx(struct sk_buff *skb, struct net_device *net) retval = usb_submit_urb(dev->tx_urb, GFP_ATOMIC); if (retval) { - err("%s: usb_submit_urb: %d", __func__, retval); + dev_err(&dev->intf->dev, "%s: usb_submit_urb: %d\n", + __func__, retval); dev->net->stats.tx_errors++; dev_kfree_skb_irq(skb); } else { @@ -414,7 +422,7 @@ static void ipheth_tx_timeout(struct net_device *net) { struct ipheth_device *dev = netdev_priv(net); - err("%s: TX timeout", __func__); + dev_err(&dev->intf->dev, "%s: TX timeout\n", __func__); dev->net->stats.tx_errors++; usb_unlink_urb(dev->tx_urb); } @@ -464,7 +472,7 @@ static int ipheth_probe(struct usb_interface *intf, hintf = usb_altnum_to_altsetting(intf, IPHETH_ALT_INTFNUM); if (hintf == NULL) { retval = -ENODEV; - err("Unable to find alternate settings interface"); + dev_err(&intf->dev, "Unable to find alternate settings interface\n"); goto err_endpoints; } @@ -477,7 +485,7 @@ static int ipheth_probe(struct usb_interface *intf, } if (!(dev->bulk_in && dev->bulk_out)) { retval = -ENODEV; - err("Unable to find endpoints"); + dev_err(&intf->dev, "Unable to find endpoints\n"); goto err_endpoints; } @@ -495,7 +503,7 @@ static int ipheth_probe(struct usb_interface *intf, retval = ipheth_alloc_urbs(dev); if (retval) { - err("error allocating urbs: %d", retval); + dev_err(&intf->dev, "error allocating urbs: %d\n", retval); goto err_alloc_urbs; } @@ -506,7 +514,7 @@ static int ipheth_probe(struct usb_interface *intf, retval = register_netdev(netdev); if (retval) { - err("error registering netdev: %d", retval); + dev_err(&intf->dev, "error registering netdev: %d\n", retval); retval = -EIO; goto err_register_netdev; } -- 2.30.2