summaryrefslogtreecommitdiff
path: root/drivers/net/ns83820.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-06-27 10:47:51 -0400
committerJeff Garzik <jeff@garzik.org>2006-07-05 13:42:07 -0400
commit2e8a538d865de0eb9813c8a0f2284e920299c0cc (patch)
tree30b773865f17b6a2768171f62fdae9700b54ec44 /drivers/net/ns83820.c
parentcabb7667dc150320ccd9d6f64fbd7a34766bc775 (diff)
downloadlwn-2e8a538d865de0eb9813c8a0f2284e920299c0cc.tar.gz
lwn-2e8a538d865de0eb9813c8a0f2284e920299c0cc.zip
[netdrvr] Use dev_printk() when ethernet interface isn't available
For messages prior to register_netdev(), prefer dev_printk() because that prints out both our driver name and our [PCI | whatever] bus id. Updates: 8139{cp,too}, b44, bnx2, cassini, {eepro,epic}100, fealnx, hamachi, ne2k-pci, ns83820, pci-skeleton, r8169. Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/ns83820.c')
-rw-r--r--drivers/net/ns83820.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c
index 70429108c40d..d6e7ac2d0c94 100644
--- a/drivers/net/ns83820.c
+++ b/drivers/net/ns83820.c
@@ -1832,7 +1832,8 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
} else if (!pci_set_dma_mask(pci_dev, DMA_32BIT_MASK)) {
using_dac = 0;
} else {
- printk(KERN_WARNING "ns83820.c: pci_set_dma_mask failed!\n");
+ dev_printk(KERN_WARNING, &pci_dev->dev,
+ "pci_set_dma_mask failed!\n");
return -ENODEV;
}
@@ -1855,7 +1856,8 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
err = pci_enable_device(pci_dev);
if (err) {
- printk(KERN_INFO "ns83820: pci_enable_dev failed: %d\n", err);
+ dev_printk(KERN_INFO, &pci_dev->dev,
+ "pci_enable_dev failed: %d\n", err);
goto out_free;
}
@@ -1884,8 +1886,9 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
err = request_irq(pci_dev->irq, ns83820_irq, IRQF_SHARED,
DRV_NAME, ndev);
if (err) {
- printk(KERN_INFO "ns83820: unable to register irq %d\n",
- pci_dev->irq);
+ dev_printk(KERN_INFO, &pci_dev->dev,
+ "unable to register irq %d, err %d\n",
+ pci_dev->irq, err);
goto out_disable;
}
@@ -1899,7 +1902,8 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
rtnl_lock();
err = dev_alloc_name(ndev, ndev->name);
if (err < 0) {
- printk(KERN_INFO "ns83820: unable to get netdev name: %d\n", err);
+ dev_printk(KERN_INFO, &pci_dev->dev,
+ "unable to get netdev name: %d\n", err);
goto out_free_irq;
}