aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-07-05 03:43:46 -0400
committerDavid S. Miller <davem@davemloft.net>2011-07-06 01:34:52 -0400
commit7329f0d58de01878d9ce4f0be7a76e136f223eef (patch)
tree84a88fda7c831c41fd464531a021a070771f1f1c
parentf9d7a1187dfefc6b54b53e0ffff4d26c0eff2702 (diff)
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: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/b44.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index 98c977ed9ade..6c4ef966ca58 100644
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -39,6 +39,7 @@
39 39
40#define DRV_MODULE_NAME "b44" 40#define DRV_MODULE_NAME "b44"
41#define DRV_MODULE_VERSION "2.0" 41#define DRV_MODULE_VERSION "2.0"
42#define DRV_DESCRIPTION "Broadcom 44xx/47xx 10/100 PCI ethernet driver"
42 43
43#define B44_DEF_MSG_ENABLE \ 44#define B44_DEF_MSG_ENABLE \
44 (NETIF_MSG_DRV | \ 45 (NETIF_MSG_DRV | \
@@ -91,11 +92,8 @@
91#define B44_ETHIPV6UDP_HLEN 62 92#define B44_ETHIPV6UDP_HLEN 62
92#define B44_ETHIPV4UDP_HLEN 42 93#define B44_ETHIPV4UDP_HLEN 42
93 94
94static char version[] __devinitdata =
95 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION "\n";
96
97MODULE_AUTHOR("Felix Fietkau, Florian Schirmer, Pekka Pietikainen, David S. Miller"); 95MODULE_AUTHOR("Felix Fietkau, Florian Schirmer, Pekka Pietikainen, David S. Miller");
98MODULE_DESCRIPTION("Broadcom 44xx/47xx 10/100 PCI ethernet driver"); 96MODULE_DESCRIPTION(DRV_DESCRIPTION);
99MODULE_LICENSE("GPL"); 97MODULE_LICENSE("GPL");
100MODULE_VERSION(DRV_MODULE_VERSION); 98MODULE_VERSION(DRV_MODULE_VERSION);
101 99
@@ -2130,16 +2128,13 @@ static const struct net_device_ops b44_netdev_ops = {
2130static int __devinit b44_init_one(struct ssb_device *sdev, 2128static int __devinit b44_init_one(struct ssb_device *sdev,
2131 const struct ssb_device_id *ent) 2129 const struct ssb_device_id *ent)
2132{ 2130{
2133 static int b44_version_printed = 0;
2134 struct net_device *dev; 2131 struct net_device *dev;
2135 struct b44 *bp; 2132 struct b44 *bp;
2136 int err; 2133 int err;
2137 2134
2138 instance++; 2135 instance++;
2139 2136
2140 if (b44_version_printed++ == 0) 2137 pr_info_once("%s version %s\n", DRV_DESCRIPTION, DRV_MODULE_VERSION);
2141 pr_info("%s", version);
2142
2143 2138
2144 dev = alloc_etherdev(sizeof(*bp)); 2139 dev = alloc_etherdev(sizeof(*bp));
2145 if (!dev) { 2140 if (!dev) {
@@ -2225,8 +2220,7 @@ static int __devinit b44_init_one(struct ssb_device *sdev,
2225 if (b44_phy_reset(bp) < 0) 2220 if (b44_phy_reset(bp) < 0)
2226 bp->phy_addr = B44_PHY_ADDR_NO_PHY; 2221 bp->phy_addr = B44_PHY_ADDR_NO_PHY;
2227 2222
2228 netdev_info(dev, "Broadcom 44xx/47xx 10/100BaseT Ethernet %pM\n", 2223 netdev_info(dev, "%s %pM\n", DRV_DESCRIPTION, dev->dev_addr);
2229 dev->dev_addr);
2230 2224
2231 return 0; 2225 return 0;
2232 2226