aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2008-08-14 12:37:34 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-10-17 17:41:08 -0400
commit4dc8994806a812044e48514af60d4b4e0315f237 (patch)
treee54fb492393827103fc13db5163e18ce01b68290
parentaa82661baf8a48379355ffa8bf162b07cf487600 (diff)
USB: remove warn() macro from usb net drivers
USB should not be having it's own printk macros, so remove warn() and use the system-wide standard of dev_warn() wherever possible. In the few places that will not work out, use a basic printk(). Cc: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/net/irda/stir4200.c10
-rw-r--r--drivers/net/usb/catc.c5
-rw-r--r--drivers/net/usb/kaweth.c8
-rw-r--r--drivers/net/usb/rtl8150.c16
4 files changed, 20 insertions, 19 deletions
diff --git a/drivers/net/irda/stir4200.c b/drivers/net/irda/stir4200.c
index 051963782749..148ce2803b00 100644
--- a/drivers/net/irda/stir4200.c
+++ b/drivers/net/irda/stir4200.c
@@ -506,7 +506,7 @@ static int change_speed(struct stir_cb *stir, unsigned speed)
506 goto found; 506 goto found;
507 } 507 }
508 508
509 warn("%s: invalid speed %d", stir->netdev->name, speed); 509 dev_warn(&stir->netdev->dev, "invalid speed %d\n", speed);
510 return -EINVAL; 510 return -EINVAL;
511 511
512 found: 512 found:
@@ -598,8 +598,8 @@ static int fifo_txwait(struct stir_cb *stir, int space)
598 err = read_reg(stir, REG_FIFOCTL, stir->fifo_status, 598 err = read_reg(stir, REG_FIFOCTL, stir->fifo_status,
599 FIFO_REGS_SIZE); 599 FIFO_REGS_SIZE);
600 if (unlikely(err != FIFO_REGS_SIZE)) { 600 if (unlikely(err != FIFO_REGS_SIZE)) {
601 warn("%s: FIFO register read error: %d", 601 dev_warn(&stir->netdev->dev,
602 stir->netdev->name, err); 602 "FIFO register read error: %d\n", err);
603 603
604 return err; 604 return err;
605 } 605 }
@@ -836,8 +836,8 @@ static void stir_rcv_irq(struct urb *urb)
836 836
837 /* in case of error, the kernel thread will restart us */ 837 /* in case of error, the kernel thread will restart us */
838 if (err) { 838 if (err) {
839 warn("%s: usb receive submit error: %d", 839 dev_warn(&stir->netdev->dev, "usb receive submit error: %d\n",
840 stir->netdev->name, err); 840 err);
841 stir->receiving = 0; 841 stir->receiving = 0;
842 wake_up_process(stir->thread); 842 wake_up_process(stir->thread);
843 } 843 }
diff --git a/drivers/net/usb/catc.c b/drivers/net/usb/catc.c
index 22c17bbacb69..92ff9c83d9f2 100644
--- a/drivers/net/usb/catc.c
+++ b/drivers/net/usb/catc.c
@@ -456,7 +456,7 @@ static void catc_tx_timeout(struct net_device *netdev)
456{ 456{
457 struct catc *catc = netdev_priv(netdev); 457 struct catc *catc = netdev_priv(netdev);
458 458
459 warn("Transmit timed out."); 459 dev_warn(&netdev->dev, "Transmit timed out.\n");
460 usb_unlink_urb(catc->tx_urb); 460 usb_unlink_urb(catc->tx_urb);
461} 461}
462 462
@@ -847,7 +847,8 @@ static int catc_probe(struct usb_interface *intf, const struct usb_device_id *id
847 dbg("64k Memory\n"); 847 dbg("64k Memory\n");
848 break; 848 break;
849 default: 849 default:
850 warn("Couldn't detect memory size, assuming 32k"); 850 dev_warn(&intf->dev,
851 "Couldn't detect memory size, assuming 32k\n");
851 case 0x87654321: 852 case 0x87654321:
852 catc_set_reg(catc, TxBufCount, 4); 853 catc_set_reg(catc, TxBufCount, 4);
853 catc_set_reg(catc, RxBufCount, 16); 854 catc_set_reg(catc, RxBufCount, 16);
diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c
index d6829db51b45..4f7a0106781e 100644
--- a/drivers/net/usb/kaweth.c
+++ b/drivers/net/usb/kaweth.c
@@ -832,7 +832,7 @@ static int kaweth_start_xmit(struct sk_buff *skb, struct net_device *net)
832 832
833 if((res = usb_submit_urb(kaweth->tx_urb, GFP_ATOMIC))) 833 if((res = usb_submit_urb(kaweth->tx_urb, GFP_ATOMIC)))
834 { 834 {
835 warn("kaweth failed tx_urb %d", res); 835 dev_warn(&net->dev, "kaweth failed tx_urb %d\n", res);
836skip: 836skip:
837 kaweth->stats.tx_errors++; 837 kaweth->stats.tx_errors++;
838 838
@@ -924,7 +924,7 @@ static void kaweth_tx_timeout(struct net_device *net)
924{ 924{
925 struct kaweth_device *kaweth = netdev_priv(net); 925 struct kaweth_device *kaweth = netdev_priv(net);
926 926
927 warn("%s: Tx timed out. Resetting.", net->name); 927 dev_warn(&net->dev, "%s: Tx timed out. Resetting.\n", net->name);
928 kaweth->stats.tx_errors++; 928 kaweth->stats.tx_errors++;
929 net->trans_start = jiffies; 929 net->trans_start = jiffies;
930 930
@@ -1209,7 +1209,7 @@ static void kaweth_disconnect(struct usb_interface *intf)
1209 1209
1210 usb_set_intfdata(intf, NULL); 1210 usb_set_intfdata(intf, NULL);
1211 if (!kaweth) { 1211 if (!kaweth) {
1212 warn("unregistering non-existant device"); 1212 dev_warn(&intf->dev, "unregistering non-existant device\n");
1213 return; 1213 return;
1214 } 1214 }
1215 netdev = kaweth->net; 1215 netdev = kaweth->net;
@@ -1269,7 +1269,7 @@ static int usb_start_wait_urb(struct urb *urb, int timeout, int* actual_length)
1269 1269
1270 if (!wait_event_timeout(awd.wqh, awd.done, timeout)) { 1270 if (!wait_event_timeout(awd.wqh, awd.done, timeout)) {
1271 // timeout 1271 // timeout
1272 warn("usb_control/bulk_msg: timeout"); 1272 dev_warn(&urb->dev->dev, "usb_control/bulk_msg: timeout\n");
1273 usb_kill_urb(urb); // remove urb safely 1273 usb_kill_urb(urb); // remove urb safely
1274 status = -ETIMEDOUT; 1274 status = -ETIMEDOUT;
1275 } 1275 }
diff --git a/drivers/net/usb/rtl8150.c b/drivers/net/usb/rtl8150.c
index df56a518691c..7726b5e86764 100644
--- a/drivers/net/usb/rtl8150.c
+++ b/drivers/net/usb/rtl8150.c
@@ -221,7 +221,7 @@ static void ctrl_callback(struct urb *urb)
221 case -ENOENT: 221 case -ENOENT:
222 break; 222 break;
223 default: 223 default:
224 warn("ctrl urb status %d", urb->status); 224 dev_warn(&urb->dev->dev, "ctrl urb status %d\n", urb->status);
225 } 225 }
226 dev = urb->context; 226 dev = urb->context;
227 clear_bit(RX_REG_SET, &dev->flags); 227 clear_bit(RX_REG_SET, &dev->flags);
@@ -441,10 +441,10 @@ static void read_bulk_callback(struct urb *urb)
441 case -ENOENT: 441 case -ENOENT:
442 return; /* the urb is in unlink state */ 442 return; /* the urb is in unlink state */
443 case -ETIME: 443 case -ETIME:
444 warn("may be reset is needed?.."); 444 dev_warn(&urb->dev->dev, "may be reset is needed?..\n");
445 goto goon; 445 goto goon;
446 default: 446 default:
447 warn("Rx status %d", urb->status); 447 dev_warn(&urb->dev->dev, "Rx status %d\n", urb->status);
448 goto goon; 448 goto goon;
449 } 449 }
450 450
@@ -665,7 +665,7 @@ static int enable_net_traffic(rtl8150_t * dev)
665 u8 cr, tcr, rcr, msr; 665 u8 cr, tcr, rcr, msr;
666 666
667 if (!rtl8150_reset(dev)) { 667 if (!rtl8150_reset(dev)) {
668 warn("%s - device reset failed", __FUNCTION__); 668 dev_warn(&dev->udev->dev, "device reset failed\n");
669 } 669 }
670 /* RCR bit7=1 attach Rx info at the end; =0 HW CRC (which is broken) */ 670 /* RCR bit7=1 attach Rx info at the end; =0 HW CRC (which is broken) */
671 rcr = 0x9e; 671 rcr = 0x9e;
@@ -699,7 +699,7 @@ static struct net_device_stats *rtl8150_netdev_stats(struct net_device *dev)
699static void rtl8150_tx_timeout(struct net_device *netdev) 699static void rtl8150_tx_timeout(struct net_device *netdev)
700{ 700{
701 rtl8150_t *dev = netdev_priv(netdev); 701 rtl8150_t *dev = netdev_priv(netdev);
702 warn("%s: Tx timeout.", netdev->name); 702 dev_warn(&netdev->dev, "Tx timeout.\n");
703 usb_unlink_urb(dev->tx_urb); 703 usb_unlink_urb(dev->tx_urb);
704 dev->stats.tx_errors++; 704 dev->stats.tx_errors++;
705} 705}
@@ -740,7 +740,7 @@ static int rtl8150_start_xmit(struct sk_buff *skb, struct net_device *netdev)
740 if (res == -ENODEV) 740 if (res == -ENODEV)
741 netif_device_detach(dev->netdev); 741 netif_device_detach(dev->netdev);
742 else { 742 else {
743 warn("failed tx_urb %d\n", res); 743 dev_warn(&netdev->dev, "failed tx_urb %d\n", res);
744 dev->stats.tx_errors++; 744 dev->stats.tx_errors++;
745 netif_start_queue(netdev); 745 netif_start_queue(netdev);
746 } 746 }
@@ -783,7 +783,7 @@ static int rtl8150_open(struct net_device *netdev)
783 if ((res = usb_submit_urb(dev->rx_urb, GFP_KERNEL))) { 783 if ((res = usb_submit_urb(dev->rx_urb, GFP_KERNEL))) {
784 if (res == -ENODEV) 784 if (res == -ENODEV)
785 netif_device_detach(dev->netdev); 785 netif_device_detach(dev->netdev);
786 warn("%s: rx_urb submit failed: %d", __FUNCTION__, res); 786 dev_warn(&netdev->dev, "rx_urb submit failed: %d\n", res);
787 return res; 787 return res;
788 } 788 }
789 usb_fill_int_urb(dev->intr_urb, dev->udev, usb_rcvintpipe(dev->udev, 3), 789 usb_fill_int_urb(dev->intr_urb, dev->udev, usb_rcvintpipe(dev->udev, 3),
@@ -792,7 +792,7 @@ static int rtl8150_open(struct net_device *netdev)
792 if ((res = usb_submit_urb(dev->intr_urb, GFP_KERNEL))) { 792 if ((res = usb_submit_urb(dev->intr_urb, GFP_KERNEL))) {
793 if (res == -ENODEV) 793 if (res == -ENODEV)
794 netif_device_detach(dev->netdev); 794 netif_device_detach(dev->netdev);
795 warn("%s: intr_urb submit failed: %d", __FUNCTION__, res); 795 dev_warn(&netdev->dev, "intr_urb submit failed: %d\n", res);
796 usb_kill_urb(dev->rx_urb); 796 usb_kill_urb(dev->rx_urb);
797 return res; 797 return res;
798 } 798 }