aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/usb/cdc_ether.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-02-17 10:30:24 +0000
committerDavid S. Miller <davem@davemloft.net>2010-02-17 13:35:41 -0800
commita475f603d23392f386e45cf377b17c30ed3bbb80 (patch)
tree47e3377f1a1bf402f33dbddc4e14768e2a9881ec /drivers/net/usb/cdc_ether.c
parent60b86755929e1a7e9038c8d860a8491cfdf8d93a (diff)
drivers/net/usb: Use netif_<level> logging facilities
Convert from: if (netif_msg_<foo>(priv)) dev_<level>(dev... to netif_<level>(priv, foo, dev... Also convert a few: if (i < REG_TIMEOUT) { etc... return ret; } to if (i >= REG_TIMEOUT) goto fail; etc... return ret; Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/cdc_ether.c')
-rw-r--r--drivers/net/usb/cdc_ether.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c
index 7e5a75269cc..3486e8ca039 100644
--- a/drivers/net/usb/cdc_ether.c
+++ b/drivers/net/usb/cdc_ether.c
@@ -339,10 +339,10 @@ EXPORT_SYMBOL_GPL(usbnet_cdc_unbind);
static void dumpspeed(struct usbnet *dev, __le32 *speeds)
{
- if (netif_msg_timer(dev))
- netdev_info(dev->net, "link speeds: %u kbps up, %u kbps down\n",
- __le32_to_cpu(speeds[0]) / 1000,
- __le32_to_cpu(speeds[1]) / 1000);
+ netif_info(dev, timer, dev->net,
+ "link speeds: %u kbps up, %u kbps down\n",
+ __le32_to_cpu(speeds[0]) / 1000,
+ __le32_to_cpu(speeds[1]) / 1000);
}
static void cdc_status(struct usbnet *dev, struct urb *urb)
@@ -361,18 +361,16 @@ static void cdc_status(struct usbnet *dev, struct urb *urb)
event = urb->transfer_buffer;
switch (event->bNotificationType) {
case USB_CDC_NOTIFY_NETWORK_CONNECTION:
- if (netif_msg_timer(dev))
- netdev_dbg(dev->net, "CDC: carrier %s\n",
- event->wValue ? "on" : "off");
+ netif_dbg(dev, timer, dev->net, "CDC: carrier %s\n",
+ event->wValue ? "on" : "off");
if (event->wValue)
netif_carrier_on(dev->net);
else
netif_carrier_off(dev->net);
break;
case USB_CDC_NOTIFY_SPEED_CHANGE: /* tx/rx rates */
- if (netif_msg_timer(dev))
- netdev_dbg(dev->net, "CDC: speed change (len %d)\n",
- urb->actual_length);
+ netif_dbg(dev, timer, dev->net, "CDC: speed change (len %d)\n",
+ urb->actual_length);
if (urb->actual_length != (sizeof *event + 8))
set_bit(EVENT_STS_SPLIT, &dev->flags);
else