Commit eb5c8bc1 authored by Cesar Eduardo Barros's avatar Cesar Eduardo Barros Committed by David S. Miller

sc92031: more useful banner in kernel log

The banner currently printed when loading the module is mostly useless.

Replace it with a more informative one, printed after probing the device.

Output format copied from 8139cp/8139too.
Signed-off-by: default avatarCesar Eduardo Barros <cesarb@cesarb.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4101dec9
...@@ -1423,6 +1423,7 @@ static int __devinit sc92031_probe(struct pci_dev *pdev, ...@@ -1423,6 +1423,7 @@ static int __devinit sc92031_probe(struct pci_dev *pdev,
struct net_device *dev; struct net_device *dev;
struct sc92031_priv *priv; struct sc92031_priv *priv;
u32 mac0, mac1; u32 mac0, mac1;
unsigned long base_addr;
err = pci_enable_device(pdev); err = pci_enable_device(pdev);
if (unlikely(err < 0)) if (unlikely(err < 0))
...@@ -1497,6 +1498,14 @@ static int __devinit sc92031_probe(struct pci_dev *pdev, ...@@ -1497,6 +1498,14 @@ static int __devinit sc92031_probe(struct pci_dev *pdev,
if (err < 0) if (err < 0)
goto out_register_netdev; goto out_register_netdev;
#if SC92031_USE_BAR == 0
base_addr = dev->mem_start;
#elif SC92031_USE_BAR == 1
base_addr = dev->base_addr;
#endif
printk(KERN_INFO "%s: SC92031 at 0x%lx, %pM, IRQ %d\n", dev->name,
base_addr, dev->dev_addr, dev->irq);
return 0; return 0;
out_register_netdev: out_register_netdev:
...@@ -1603,7 +1612,6 @@ static struct pci_driver sc92031_pci_driver = { ...@@ -1603,7 +1612,6 @@ static struct pci_driver sc92031_pci_driver = {
static int __init sc92031_init(void) static int __init sc92031_init(void)
{ {
printk(KERN_INFO SC92031_DESCRIPTION " " SC92031_VERSION "\n");
return pci_register_driver(&sc92031_pci_driver); return pci_register_driver(&sc92031_pci_driver);
} }
......
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