Commit 48005993 authored by Ben Boeckel's avatar Ben Boeckel Committed by David S. Miller

smsc9420: replace printk with netdev_ calls

Signed-off-by: default avatarBen Boeckel <mathstuf@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c501b1f5
...@@ -99,17 +99,17 @@ MODULE_PARM_DESC(debug, "debug level"); ...@@ -99,17 +99,17 @@ MODULE_PARM_DESC(debug, "debug level");
#define smsc_dbg(TYPE, f, a...) \ #define smsc_dbg(TYPE, f, a...) \
do { if ((pd)->msg_enable & NETIF_MSG_##TYPE) \ do { if ((pd)->msg_enable & NETIF_MSG_##TYPE) \
printk(KERN_DEBUG PFX f "\n", ## a); \ netdev_dbg((pd)->dev, PFX f "\n", ## a); \
} while (0) } while (0)
#define smsc_info(TYPE, f, a...) \ #define smsc_info(TYPE, f, a...) \
do { if ((pd)->msg_enable & NETIF_MSG_##TYPE) \ do { if ((pd)->msg_enable & NETIF_MSG_##TYPE) \
printk(KERN_INFO PFX f "\n", ## a); \ netdev_info((pd)->dev, PFX f "\n", ## a); \
} while (0) } while (0)
#define smsc_warn(TYPE, f, a...) \ #define smsc_warn(TYPE, f, a...) \
do { if ((pd)->msg_enable & NETIF_MSG_##TYPE) \ do { if ((pd)->msg_enable & NETIF_MSG_##TYPE) \
printk(KERN_WARNING PFX f "\n", ## a); \ netdev_warn((pd)->dev, PFX f "\n", ## a); \
} while (0) } while (0)
static inline u32 smsc9420_reg_read(struct smsc9420_pdata *pd, u32 offset) 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) ...@@ -1168,7 +1168,7 @@ static int smsc9420_mii_probe(struct net_device *dev)
/* Device only supports internal PHY at address 1 */ /* Device only supports internal PHY at address 1 */
if (!pd->mii_bus->phy_map[1]) { if (!pd->mii_bus->phy_map[1]) {
pr_err("%s: no PHY found at address 1\n", dev->name); netdev_err(dev, "no PHY found at address 1\n");
return -ENODEV; return -ENODEV;
} }
...@@ -1180,12 +1180,12 @@ static int smsc9420_mii_probe(struct net_device *dev) ...@@ -1180,12 +1180,12 @@ static int smsc9420_mii_probe(struct net_device *dev)
smsc9420_phy_adjust_link, PHY_INTERFACE_MODE_MII); smsc9420_phy_adjust_link, PHY_INTERFACE_MODE_MII);
if (IS_ERR(phydev)) { if (IS_ERR(phydev)) {
pr_err("%s: Could not attach to PHY\n", dev->name); netdev_err(dev, "Could not attach to PHY\n");
return PTR_ERR(phydev); return PTR_ERR(phydev);
} }
pr_info("%s: attached PHY driver [%s] (mii_bus:phy_addr=%s, irq=%d)\n", netdev_info(dev, "attached PHY driver [%s] (mii_bus:phy_addr=%s, irq=%d)\n",
dev->name, phydev->drv->name, dev_name(&phydev->dev), phydev->irq); phydev->drv->name, dev_name(&phydev->dev), phydev->irq);
/* mask with MAC supported features */ /* mask with MAC supported features */
phydev->supported &= (PHY_BASIC_FEATURES | SUPPORTED_Pause | phydev->supported &= (PHY_BASIC_FEATURES | SUPPORTED_Pause |
...@@ -1582,12 +1582,12 @@ smsc9420_probe(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -1582,12 +1582,12 @@ smsc9420_probe(struct pci_dev *pdev, const struct pci_device_id *id)
int result = 0; int result = 0;
u32 id_rev; u32 id_rev;
printk(KERN_INFO DRV_DESCRIPTION " version " DRV_VERSION "\n"); pr_info(DRV_DESCRIPTION " version " DRV_VERSION "\n");
/* First do the PCI initialisation */ /* First do the PCI initialisation */
result = pci_enable_device(pdev); result = pci_enable_device(pdev);
if (unlikely(result)) { if (unlikely(result)) {
printk(KERN_ERR "Cannot enable smsc9420\n"); pr_err("Cannot enable smsc9420\n");
goto out_0; goto out_0;
} }
...@@ -1600,24 +1600,24 @@ smsc9420_probe(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -1600,24 +1600,24 @@ smsc9420_probe(struct pci_dev *pdev, const struct pci_device_id *id)
SET_NETDEV_DEV(dev, &pdev->dev); SET_NETDEV_DEV(dev, &pdev->dev);
if (!(pci_resource_flags(pdev, SMSC_BAR) & IORESOURCE_MEM)) { if (!(pci_resource_flags(pdev, SMSC_BAR) & IORESOURCE_MEM)) {
printk(KERN_ERR "Cannot find PCI device base address\n"); netdev_err(dev, "Cannot find PCI device base address\n");
goto out_free_netdev_2; goto out_free_netdev_2;
} }
if ((pci_request_regions(pdev, DRV_NAME))) { if ((pci_request_regions(pdev, DRV_NAME))) {
printk(KERN_ERR "Cannot obtain PCI resources, aborting.\n"); netdev_err(dev, "Cannot obtain PCI resources, aborting.\n");
goto out_free_netdev_2; goto out_free_netdev_2;
} }
if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) { if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
printk(KERN_ERR "No usable DMA configuration, aborting.\n"); netdev_err(dev, "No usable DMA configuration, aborting.\n");
goto out_free_regions_3; goto out_free_regions_3;
} }
virt_addr = ioremap(pci_resource_start(pdev, SMSC_BAR), virt_addr = ioremap(pci_resource_start(pdev, SMSC_BAR),
pci_resource_len(pdev, SMSC_BAR)); pci_resource_len(pdev, SMSC_BAR));
if (!virt_addr) { if (!virt_addr) {
printk(KERN_ERR "Cannot map device registers, aborting.\n"); netdev_err(dev, "Cannot map device registers, aborting.\n");
goto out_free_regions_3; goto out_free_regions_3;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment