aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-03-03 15:55:08 -0500
committerDavid S. Miller <davem@davemloft.net>2011-03-03 16:02:32 -0500
commit967faf3b718e887301adb1636c2295f03d3c694f (patch)
tree21bf6963656348aab9887c3954d34c7382c2ed85 /drivers/net
parent7542db8b1cb88ab15a85893d1dfb886e22b568e8 (diff)
mii: Convert printks to netdev_info
Add a bit more data to the output. Convert string speeds to integer. Object size reduced a tiny bit. $ size drivers/net/mii.o* text data bss dec hex filename 4155 56 1000 5211 145b drivers/net/mii.o.new 4184 56 1000 5240 1478 drivers/net/mii.o.old Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/mii.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/mii.c b/drivers/net/mii.c
index 210b2b164b30..0a6c6a2e7550 100644
--- a/drivers/net/mii.c
+++ b/drivers/net/mii.c
@@ -354,7 +354,7 @@ unsigned int mii_check_media (struct mii_if_info *mii,
354 if (!new_carrier) { 354 if (!new_carrier) {
355 netif_carrier_off(mii->dev); 355 netif_carrier_off(mii->dev);
356 if (ok_to_print) 356 if (ok_to_print)
357 printk(KERN_INFO "%s: link down\n", mii->dev->name); 357 netdev_info(mii->dev, "link down\n");
358 return 0; /* duplex did not change */ 358 return 0; /* duplex did not change */
359 } 359 }
360 360
@@ -381,12 +381,12 @@ unsigned int mii_check_media (struct mii_if_info *mii,
381 duplex = 1; 381 duplex = 1;
382 382
383 if (ok_to_print) 383 if (ok_to_print)
384 printk(KERN_INFO "%s: link up, %sMbps, %s-duplex, lpa 0x%04X\n", 384 netdev_info(mii->dev, "link up, %uMbps, %s-duplex, lpa 0x%04X\n",
385 mii->dev->name, 385 lpa2 & (LPA_1000FULL | LPA_1000HALF) ? 1000 :
386 lpa2 & (LPA_1000FULL | LPA_1000HALF) ? "1000" : 386 media & (ADVERTISE_100FULL | ADVERTISE_100HALF) ?
387 media & (ADVERTISE_100FULL | ADVERTISE_100HALF) ? "100" : "10", 387 100 : 10,
388 duplex ? "full" : "half", 388 duplex ? "full" : "half",
389 lpa); 389 lpa);
390 390
391 if ((init_media) || (mii->full_duplex != duplex)) { 391 if ((init_media) || (mii->full_duplex != duplex)) {
392 mii->full_duplex = duplex; 392 mii->full_duplex = duplex;