diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-25 17:48:50 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-25 17:48:50 -0400 |
commit | 6f0d27ff97f66c041e2adc86b61e8957e8dd056d (patch) | |
tree | f5c7e05987d6a9feb06cea71646b0e938e79ad6c /drivers/net/irda | |
parent | 3d55ea3e2233c994649d9e5dc9eff58f915cd81d (diff) |
USB: kingsun-sir.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.
CC: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/irda')
-rw-r--r-- | drivers/net/irda/kingsun-sir.c | 42 |
1 files changed, 26 insertions, 16 deletions
diff --git a/drivers/net/irda/kingsun-sir.c b/drivers/net/irda/kingsun-sir.c index 79aebeee928c..7b4833874ef5 100644 --- a/drivers/net/irda/kingsun-sir.c +++ b/drivers/net/irda/kingsun-sir.c | |||
@@ -134,14 +134,16 @@ static void kingsun_send_irq(struct urb *urb) | |||
134 | 134 | ||
135 | /* in process of stopping, just drop data */ | 135 | /* in process of stopping, just drop data */ |
136 | if (!netif_running(kingsun->netdev)) { | 136 | if (!netif_running(kingsun->netdev)) { |
137 | err("kingsun_send_irq: Network not running!"); | 137 | dev_err(&kingsun->usbdev->dev, |
138 | "kingsun_send_irq: Network not running!\n"); | ||
138 | return; | 139 | return; |
139 | } | 140 | } |
140 | 141 | ||
141 | /* unlink, shutdown, unplug, other nasties */ | 142 | /* unlink, shutdown, unplug, other nasties */ |
142 | if (urb->status != 0) { | 143 | if (urb->status != 0) { |
143 | err("kingsun_send_irq: urb asynchronously failed - %d", | 144 | dev_err(&kingsun->usbdev->dev, |
144 | urb->status); | 145 | "kingsun_send_irq: urb asynchronously failed - %d\n", |
146 | urb->status); | ||
145 | } | 147 | } |
146 | netif_wake_queue(netdev); | 148 | netif_wake_queue(netdev); |
147 | } | 149 | } |
@@ -177,7 +179,8 @@ static netdev_tx_t kingsun_hard_xmit(struct sk_buff *skb, | |||
177 | kingsun, 1); | 179 | kingsun, 1); |
178 | 180 | ||
179 | if ((ret = usb_submit_urb(kingsun->tx_urb, GFP_ATOMIC))) { | 181 | if ((ret = usb_submit_urb(kingsun->tx_urb, GFP_ATOMIC))) { |
180 | err("kingsun_hard_xmit: failed tx_urb submit: %d", ret); | 182 | dev_err(&kingsun->usbdev->dev, |
183 | "kingsun_hard_xmit: failed tx_urb submit: %d\n", ret); | ||
181 | switch (ret) { | 184 | switch (ret) { |
182 | case -ENODEV: | 185 | case -ENODEV: |
183 | case -EPIPE: | 186 | case -EPIPE: |
@@ -211,8 +214,9 @@ static void kingsun_rcv_irq(struct urb *urb) | |||
211 | 214 | ||
212 | /* unlink, shutdown, unplug, other nasties */ | 215 | /* unlink, shutdown, unplug, other nasties */ |
213 | if (urb->status != 0) { | 216 | if (urb->status != 0) { |
214 | err("kingsun_rcv_irq: urb asynchronously failed - %d", | 217 | dev_err(&kingsun->usbdev->dev, |
215 | urb->status); | 218 | "kingsun_rcv_irq: urb asynchronously failed - %d\n", |
219 | urb->status); | ||
216 | kingsun->receiving = 0; | 220 | kingsun->receiving = 0; |
217 | return; | 221 | return; |
218 | } | 222 | } |
@@ -238,8 +242,9 @@ static void kingsun_rcv_irq(struct urb *urb) | |||
238 | ? 1 : 0; | 242 | ? 1 : 0; |
239 | } | 243 | } |
240 | } else if (urb->actual_length > 0) { | 244 | } else if (urb->actual_length > 0) { |
241 | err("%s(): Unexpected response length, expected %d got %d", | 245 | dev_err(&kingsun->usbdev->dev, |
242 | __func__, kingsun->max_rx, urb->actual_length); | 246 | "%s(): Unexpected response length, expected %d got %d\n", |
247 | __func__, kingsun->max_rx, urb->actual_length); | ||
243 | } | 248 | } |
244 | /* This urb has already been filled in kingsun_net_open */ | 249 | /* This urb has already been filled in kingsun_net_open */ |
245 | ret = usb_submit_urb(urb, GFP_ATOMIC); | 250 | ret = usb_submit_urb(urb, GFP_ATOMIC); |
@@ -286,7 +291,7 @@ static int kingsun_net_open(struct net_device *netdev) | |||
286 | sprintf(hwname, "usb#%d", kingsun->usbdev->devnum); | 291 | sprintf(hwname, "usb#%d", kingsun->usbdev->devnum); |
287 | kingsun->irlap = irlap_open(netdev, &kingsun->qos, hwname); | 292 | kingsun->irlap = irlap_open(netdev, &kingsun->qos, hwname); |
288 | if (!kingsun->irlap) { | 293 | if (!kingsun->irlap) { |
289 | err("kingsun-sir: irlap_open failed"); | 294 | dev_err(&kingsun->usbdev->dev, "irlap_open failed\n"); |
290 | goto free_mem; | 295 | goto free_mem; |
291 | } | 296 | } |
292 | 297 | ||
@@ -298,7 +303,8 @@ static int kingsun_net_open(struct net_device *netdev) | |||
298 | kingsun->rx_urb->status = 0; | 303 | kingsun->rx_urb->status = 0; |
299 | err = usb_submit_urb(kingsun->rx_urb, GFP_KERNEL); | 304 | err = usb_submit_urb(kingsun->rx_urb, GFP_KERNEL); |
300 | if (err) { | 305 | if (err) { |
301 | err("kingsun-sir: first urb-submit failed: %d", err); | 306 | dev_err(&kingsun->usbdev->dev, |
307 | "first urb-submit failed: %d\n", err); | ||
302 | goto close_irlap; | 308 | goto close_irlap; |
303 | } | 309 | } |
304 | 310 | ||
@@ -446,13 +452,15 @@ static int kingsun_probe(struct usb_interface *intf, | |||
446 | */ | 452 | */ |
447 | interface = intf->cur_altsetting; | 453 | interface = intf->cur_altsetting; |
448 | if (interface->desc.bNumEndpoints != 2) { | 454 | if (interface->desc.bNumEndpoints != 2) { |
449 | err("kingsun-sir: expected 2 endpoints, found %d", | 455 | dev_err(&intf->dev, |
450 | interface->desc.bNumEndpoints); | 456 | "kingsun-sir: expected 2 endpoints, found %d\n", |
457 | interface->desc.bNumEndpoints); | ||
451 | return -ENODEV; | 458 | return -ENODEV; |
452 | } | 459 | } |
453 | endpoint = &interface->endpoint[KINGSUN_EP_IN].desc; | 460 | endpoint = &interface->endpoint[KINGSUN_EP_IN].desc; |
454 | if (!usb_endpoint_is_int_in(endpoint)) { | 461 | if (!usb_endpoint_is_int_in(endpoint)) { |
455 | err("kingsun-sir: endpoint 0 is not interrupt IN"); | 462 | dev_err(&intf->dev, |
463 | "kingsun-sir: endpoint 0 is not interrupt IN\n"); | ||
456 | return -ENODEV; | 464 | return -ENODEV; |
457 | } | 465 | } |
458 | 466 | ||
@@ -460,14 +468,16 @@ static int kingsun_probe(struct usb_interface *intf, | |||
460 | pipe = usb_rcvintpipe(dev, ep_in); | 468 | pipe = usb_rcvintpipe(dev, ep_in); |
461 | maxp_in = usb_maxpacket(dev, pipe, usb_pipeout(pipe)); | 469 | maxp_in = usb_maxpacket(dev, pipe, usb_pipeout(pipe)); |
462 | if (maxp_in > 255 || maxp_in <= 1) { | 470 | if (maxp_in > 255 || maxp_in <= 1) { |
463 | err("%s: endpoint 0 has max packet size %d not in range", | 471 | dev_err(&intf->dev, |
464 | __FILE__, maxp_in); | 472 | "endpoint 0 has max packet size %d not in range\n", |
473 | maxp_in); | ||
465 | return -ENODEV; | 474 | return -ENODEV; |
466 | } | 475 | } |
467 | 476 | ||
468 | endpoint = &interface->endpoint[KINGSUN_EP_OUT].desc; | 477 | endpoint = &interface->endpoint[KINGSUN_EP_OUT].desc; |
469 | if (!usb_endpoint_is_int_out(endpoint)) { | 478 | if (!usb_endpoint_is_int_out(endpoint)) { |
470 | err("kingsun-sir: endpoint 1 is not interrupt OUT"); | 479 | dev_err(&intf->dev, |
480 | "kingsun-sir: endpoint 1 is not interrupt OUT\n"); | ||
471 | return -ENODEV; | 481 | return -ENODEV; |
472 | } | 482 | } |
473 | 483 | ||