Skip to content

Commit 4800599

Browse files
mathstufdavem330
authored andcommitted
smsc9420: replace printk with netdev_ calls
Signed-off-by: Ben Boeckel <mathstuf@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent c501b1f commit 4800599

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

drivers/net/ethernet/smsc/smsc9420.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -99,17 +99,17 @@ MODULE_PARM_DESC(debug, "debug level");
9999

100100
#define smsc_dbg(TYPE, f, a...) \
101101
do { if ((pd)->msg_enable & NETIF_MSG_##TYPE) \
102-
printk(KERN_DEBUG PFX f "\n", ## a); \
102+
netdev_dbg((pd)->dev, PFX f "\n", ## a); \
103103
} while (0)
104104

105105
#define smsc_info(TYPE, f, a...) \
106106
do { if ((pd)->msg_enable & NETIF_MSG_##TYPE) \
107-
printk(KERN_INFO PFX f "\n", ## a); \
107+
netdev_info((pd)->dev, PFX f "\n", ## a); \
108108
} while (0)
109109

110110
#define smsc_warn(TYPE, f, a...) \
111111
do { if ((pd)->msg_enable & NETIF_MSG_##TYPE) \
112-
printk(KERN_WARNING PFX f "\n", ## a); \
112+
netdev_warn((pd)->dev, PFX f "\n", ## a); \
113113
} while (0)
114114

115115
static inline u32 smsc9420_reg_read(struct smsc9420_pdata *pd, u32 offset)
@@ -1168,7 +1168,7 @@ static int smsc9420_mii_probe(struct net_device *dev)
11681168

11691169
/* Device only supports internal PHY at address 1 */
11701170
if (!pd->mii_bus->phy_map[1]) {
1171-
pr_err("%s: no PHY found at address 1\n", dev->name);
1171+
netdev_err(dev, "no PHY found at address 1\n");
11721172
return -ENODEV;
11731173
}
11741174

@@ -1180,12 +1180,12 @@ static int smsc9420_mii_probe(struct net_device *dev)
11801180
smsc9420_phy_adjust_link, PHY_INTERFACE_MODE_MII);
11811181

11821182
if (IS_ERR(phydev)) {
1183-
pr_err("%s: Could not attach to PHY\n", dev->name);
1183+
netdev_err(dev, "Could not attach to PHY\n");
11841184
return PTR_ERR(phydev);
11851185
}
11861186

1187-
pr_info("%s: attached PHY driver [%s] (mii_bus:phy_addr=%s, irq=%d)\n",
1188-
dev->name, phydev->drv->name, dev_name(&phydev->dev), phydev->irq);
1187+
netdev_info(dev, "attached PHY driver [%s] (mii_bus:phy_addr=%s, irq=%d)\n",
1188+
phydev->drv->name, dev_name(&phydev->dev), phydev->irq);
11891189

11901190
/* mask with MAC supported features */
11911191
phydev->supported &= (PHY_BASIC_FEATURES | SUPPORTED_Pause |
@@ -1582,12 +1582,12 @@ smsc9420_probe(struct pci_dev *pdev, const struct pci_device_id *id)
15821582
int result = 0;
15831583
u32 id_rev;
15841584

1585-
printk(KERN_INFO DRV_DESCRIPTION " version " DRV_VERSION "\n");
1585+
pr_info(DRV_DESCRIPTION " version " DRV_VERSION "\n");
15861586

15871587
/* First do the PCI initialisation */
15881588
result = pci_enable_device(pdev);
15891589
if (unlikely(result)) {
1590-
printk(KERN_ERR "Cannot enable smsc9420\n");
1590+
pr_err("Cannot enable smsc9420\n");
15911591
goto out_0;
15921592
}
15931593

@@ -1600,24 +1600,24 @@ smsc9420_probe(struct pci_dev *pdev, const struct pci_device_id *id)
16001600
SET_NETDEV_DEV(dev, &pdev->dev);
16011601

16021602
if (!(pci_resource_flags(pdev, SMSC_BAR) & IORESOURCE_MEM)) {
1603-
printk(KERN_ERR "Cannot find PCI device base address\n");
1603+
netdev_err(dev, "Cannot find PCI device base address\n");
16041604
goto out_free_netdev_2;
16051605
}
16061606

16071607
if ((pci_request_regions(pdev, DRV_NAME))) {
1608-
printk(KERN_ERR "Cannot obtain PCI resources, aborting.\n");
1608+
netdev_err(dev, "Cannot obtain PCI resources, aborting.\n");
16091609
goto out_free_netdev_2;
16101610
}
16111611

16121612
if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
1613-
printk(KERN_ERR "No usable DMA configuration, aborting.\n");
1613+
netdev_err(dev, "No usable DMA configuration, aborting.\n");
16141614
goto out_free_regions_3;
16151615
}
16161616

16171617
virt_addr = ioremap(pci_resource_start(pdev, SMSC_BAR),
16181618
pci_resource_len(pdev, SMSC_BAR));
16191619
if (!virt_addr) {
1620-
printk(KERN_ERR "Cannot map device registers, aborting.\n");
1620+
netdev_err(dev, "Cannot map device registers, aborting.\n");
16211621
goto out_free_regions_3;
16221622
}
16231623

0 commit comments

Comments
 (0)