diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-25 15:37:48 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-25 15:37:48 -0400 |
commit | 495f71e2b95d30198314e6e358987f8effbefcc9 (patch) | |
tree | cc83205fa84aff4a5688199abd940bf1a3c3d09a /drivers/net/usb/ipheth.c | |
parent | 50c627c9c39f38c2c2f50b8b24c86d47324d28c1 (diff) |
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 <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/usb/ipheth.c')
-rw-r--r-- | drivers/net/usb/ipheth.c | 34 |
1 files 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) | |||
209 | case 0: | 209 | case 0: |
210 | break; | 210 | break; |
211 | default: | 211 | default: |
212 | err("%s: urb status: %d", __func__, status); | 212 | dev_err(&dev->intf->dev, "%s: urb status: %d\n", |
213 | __func__, status); | ||
213 | return; | 214 | return; |
214 | } | 215 | } |
215 | 216 | ||
@@ -222,7 +223,8 @@ static void ipheth_rcvbulk_callback(struct urb *urb) | |||
222 | 223 | ||
223 | skb = dev_alloc_skb(len); | 224 | skb = dev_alloc_skb(len); |
224 | if (!skb) { | 225 | if (!skb) { |
225 | err("%s: dev_alloc_skb: -ENOMEM", __func__); | 226 | dev_err(&dev->intf->dev, "%s: dev_alloc_skb: -ENOMEM\n", |
227 | __func__); | ||
226 | dev->net->stats.rx_dropped++; | 228 | dev->net->stats.rx_dropped++; |
227 | return; | 229 | return; |
228 | } | 230 | } |
@@ -251,7 +253,8 @@ static void ipheth_sndbulk_callback(struct urb *urb) | |||
251 | status != -ENOENT && | 253 | status != -ENOENT && |
252 | status != -ECONNRESET && | 254 | status != -ECONNRESET && |
253 | status != -ESHUTDOWN) | 255 | status != -ESHUTDOWN) |
254 | err("%s: urb status: %d", __func__, status); | 256 | dev_err(&dev->intf->dev, "%s: urb status: %d\n", |
257 | __func__, status); | ||
255 | 258 | ||
256 | dev_kfree_skb_irq(dev->tx_skb); | 259 | dev_kfree_skb_irq(dev->tx_skb); |
257 | netif_wake_queue(dev->net); | 260 | netif_wake_queue(dev->net); |
@@ -271,7 +274,8 @@ static int ipheth_carrier_set(struct ipheth_device *dev) | |||
271 | dev->ctrl_buf, IPHETH_CTRL_BUF_SIZE, | 274 | dev->ctrl_buf, IPHETH_CTRL_BUF_SIZE, |
272 | IPHETH_CTRL_TIMEOUT); | 275 | IPHETH_CTRL_TIMEOUT); |
273 | if (retval < 0) { | 276 | if (retval < 0) { |
274 | err("%s: usb_control_msg: %d", __func__, retval); | 277 | dev_err(&dev->intf->dev, "%s: usb_control_msg: %d\n", |
278 | __func__, retval); | ||
275 | return retval; | 279 | return retval; |
276 | } | 280 | } |
277 | 281 | ||
@@ -308,9 +312,11 @@ static int ipheth_get_macaddr(struct ipheth_device *dev) | |||
308 | IPHETH_CTRL_BUF_SIZE, | 312 | IPHETH_CTRL_BUF_SIZE, |
309 | IPHETH_CTRL_TIMEOUT); | 313 | IPHETH_CTRL_TIMEOUT); |
310 | if (retval < 0) { | 314 | if (retval < 0) { |
311 | err("%s: usb_control_msg: %d", __func__, retval); | 315 | dev_err(&dev->intf->dev, "%s: usb_control_msg: %d\n", |
316 | __func__, retval); | ||
312 | } else if (retval < ETH_ALEN) { | 317 | } else if (retval < ETH_ALEN) { |
313 | err("%s: usb_control_msg: short packet: %d bytes", | 318 | dev_err(&dev->intf->dev, |
319 | "%s: usb_control_msg: short packet: %d bytes\n", | ||
314 | __func__, retval); | 320 | __func__, retval); |
315 | retval = -EINVAL; | 321 | retval = -EINVAL; |
316 | } else { | 322 | } else { |
@@ -335,7 +341,8 @@ static int ipheth_rx_submit(struct ipheth_device *dev, gfp_t mem_flags) | |||
335 | 341 | ||
336 | retval = usb_submit_urb(dev->rx_urb, mem_flags); | 342 | retval = usb_submit_urb(dev->rx_urb, mem_flags); |
337 | if (retval) | 343 | if (retval) |
338 | err("%s: usb_submit_urb: %d", __func__, retval); | 344 | dev_err(&dev->intf->dev, "%s: usb_submit_urb: %d\n", |
345 | __func__, retval); | ||
339 | return retval; | 346 | return retval; |
340 | } | 347 | } |
341 | 348 | ||
@@ -396,7 +403,8 @@ static int ipheth_tx(struct sk_buff *skb, struct net_device *net) | |||
396 | 403 | ||
397 | retval = usb_submit_urb(dev->tx_urb, GFP_ATOMIC); | 404 | retval = usb_submit_urb(dev->tx_urb, GFP_ATOMIC); |
398 | if (retval) { | 405 | if (retval) { |
399 | err("%s: usb_submit_urb: %d", __func__, retval); | 406 | dev_err(&dev->intf->dev, "%s: usb_submit_urb: %d\n", |
407 | __func__, retval); | ||
400 | dev->net->stats.tx_errors++; | 408 | dev->net->stats.tx_errors++; |
401 | dev_kfree_skb_irq(skb); | 409 | dev_kfree_skb_irq(skb); |
402 | } else { | 410 | } else { |
@@ -414,7 +422,7 @@ static void ipheth_tx_timeout(struct net_device *net) | |||
414 | { | 422 | { |
415 | struct ipheth_device *dev = netdev_priv(net); | 423 | struct ipheth_device *dev = netdev_priv(net); |
416 | 424 | ||
417 | err("%s: TX timeout", __func__); | 425 | dev_err(&dev->intf->dev, "%s: TX timeout\n", __func__); |
418 | dev->net->stats.tx_errors++; | 426 | dev->net->stats.tx_errors++; |
419 | usb_unlink_urb(dev->tx_urb); | 427 | usb_unlink_urb(dev->tx_urb); |
420 | } | 428 | } |
@@ -464,7 +472,7 @@ static int ipheth_probe(struct usb_interface *intf, | |||
464 | hintf = usb_altnum_to_altsetting(intf, IPHETH_ALT_INTFNUM); | 472 | hintf = usb_altnum_to_altsetting(intf, IPHETH_ALT_INTFNUM); |
465 | if (hintf == NULL) { | 473 | if (hintf == NULL) { |
466 | retval = -ENODEV; | 474 | retval = -ENODEV; |
467 | err("Unable to find alternate settings interface"); | 475 | dev_err(&intf->dev, "Unable to find alternate settings interface\n"); |
468 | goto err_endpoints; | 476 | goto err_endpoints; |
469 | } | 477 | } |
470 | 478 | ||
@@ -477,7 +485,7 @@ static int ipheth_probe(struct usb_interface *intf, | |||
477 | } | 485 | } |
478 | if (!(dev->bulk_in && dev->bulk_out)) { | 486 | if (!(dev->bulk_in && dev->bulk_out)) { |
479 | retval = -ENODEV; | 487 | retval = -ENODEV; |
480 | err("Unable to find endpoints"); | 488 | dev_err(&intf->dev, "Unable to find endpoints\n"); |
481 | goto err_endpoints; | 489 | goto err_endpoints; |
482 | } | 490 | } |
483 | 491 | ||
@@ -495,7 +503,7 @@ static int ipheth_probe(struct usb_interface *intf, | |||
495 | 503 | ||
496 | retval = ipheth_alloc_urbs(dev); | 504 | retval = ipheth_alloc_urbs(dev); |
497 | if (retval) { | 505 | if (retval) { |
498 | err("error allocating urbs: %d", retval); | 506 | dev_err(&intf->dev, "error allocating urbs: %d\n", retval); |
499 | goto err_alloc_urbs; | 507 | goto err_alloc_urbs; |
500 | } | 508 | } |
501 | 509 | ||
@@ -506,7 +514,7 @@ static int ipheth_probe(struct usb_interface *intf, | |||
506 | 514 | ||
507 | retval = register_netdev(netdev); | 515 | retval = register_netdev(netdev); |
508 | if (retval) { | 516 | if (retval) { |
509 | err("error registering netdev: %d", retval); | 517 | dev_err(&intf->dev, "error registering netdev: %d\n", retval); |
510 | retval = -EIO; | 518 | retval = -EIO; |
511 | goto err_register_netdev; | 519 | goto err_register_netdev; |
512 | } | 520 | } |