Commit 7329f0d5 authored by Joe Perches's avatar Joe Perches Committed by David S. Miller

b44: Use pr_<level>_once and DRV_DESCRIPTION

Convert a printk with a static to pr_<level>_once
Add and use DRV_DESCRIPTION to reduce string duplication.
Remove now unused version.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f9d7a118
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#define DRV_MODULE_NAME "b44" #define DRV_MODULE_NAME "b44"
#define DRV_MODULE_VERSION "2.0" #define DRV_MODULE_VERSION "2.0"
#define DRV_DESCRIPTION "Broadcom 44xx/47xx 10/100 PCI ethernet driver"
#define B44_DEF_MSG_ENABLE \ #define B44_DEF_MSG_ENABLE \
(NETIF_MSG_DRV | \ (NETIF_MSG_DRV | \
...@@ -91,11 +92,8 @@ ...@@ -91,11 +92,8 @@
#define B44_ETHIPV6UDP_HLEN 62 #define B44_ETHIPV6UDP_HLEN 62
#define B44_ETHIPV4UDP_HLEN 42 #define B44_ETHIPV4UDP_HLEN 42
static char version[] __devinitdata =
DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION "\n";
MODULE_AUTHOR("Felix Fietkau, Florian Schirmer, Pekka Pietikainen, David S. Miller"); MODULE_AUTHOR("Felix Fietkau, Florian Schirmer, Pekka Pietikainen, David S. Miller");
MODULE_DESCRIPTION("Broadcom 44xx/47xx 10/100 PCI ethernet driver"); MODULE_DESCRIPTION(DRV_DESCRIPTION);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_MODULE_VERSION); MODULE_VERSION(DRV_MODULE_VERSION);
...@@ -2130,16 +2128,13 @@ static const struct net_device_ops b44_netdev_ops = { ...@@ -2130,16 +2128,13 @@ static const struct net_device_ops b44_netdev_ops = {
static int __devinit b44_init_one(struct ssb_device *sdev, static int __devinit b44_init_one(struct ssb_device *sdev,
const struct ssb_device_id *ent) const struct ssb_device_id *ent)
{ {
static int b44_version_printed = 0;
struct net_device *dev; struct net_device *dev;
struct b44 *bp; struct b44 *bp;
int err; int err;
instance++; instance++;
if (b44_version_printed++ == 0) pr_info_once("%s version %s\n", DRV_DESCRIPTION, DRV_MODULE_VERSION);
pr_info("%s", version);
dev = alloc_etherdev(sizeof(*bp)); dev = alloc_etherdev(sizeof(*bp));
if (!dev) { if (!dev) {
...@@ -2225,8 +2220,7 @@ static int __devinit b44_init_one(struct ssb_device *sdev, ...@@ -2225,8 +2220,7 @@ static int __devinit b44_init_one(struct ssb_device *sdev,
if (b44_phy_reset(bp) < 0) if (b44_phy_reset(bp) < 0)
bp->phy_addr = B44_PHY_ADDR_NO_PHY; bp->phy_addr = B44_PHY_ADDR_NO_PHY;
netdev_info(dev, "Broadcom 44xx/47xx 10/100BaseT Ethernet %pM\n", netdev_info(dev, "%s %pM\n", DRV_DESCRIPTION, dev->dev_addr);
dev->dev_addr);
return 0; return 0;
......
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