diff options
author | Eilon Greenstein <eilong@broadcom.com> | 2009-08-12 04:23:37 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-13 02:02:51 -0400 |
commit | 938cf5416d59769ec2e7ce4eb7967cb3b61242a3 (patch) | |
tree | a708f216bca4fd8502c1dbb5a4a5650184ea6afb | |
parent | 37f9ce6231cafb2973e09f7f72ad62bc6348d1b3 (diff) |
bnx2x: Move printing of version from probe to the init
Move printing of version from probe to the init function
Rather then checking if this is the first module probe call to print
the version of the driver only once, the statement is moved to the init
function of the module where init is only called once
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/bnx2x_main.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c index 807c1565ef80..f1bd0a32cc30 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c | |||
@@ -11872,15 +11872,11 @@ request_firmware_exit: | |||
11872 | static int __devinit bnx2x_init_one(struct pci_dev *pdev, | 11872 | static int __devinit bnx2x_init_one(struct pci_dev *pdev, |
11873 | const struct pci_device_id *ent) | 11873 | const struct pci_device_id *ent) |
11874 | { | 11874 | { |
11875 | static int version_printed; | ||
11876 | struct net_device *dev = NULL; | 11875 | struct net_device *dev = NULL; |
11877 | struct bnx2x *bp; | 11876 | struct bnx2x *bp; |
11878 | int pcie_width, pcie_speed; | 11877 | int pcie_width, pcie_speed; |
11879 | int rc; | 11878 | int rc; |
11880 | 11879 | ||
11881 | if (version_printed++ == 0) | ||
11882 | printk(KERN_INFO "%s", version); | ||
11883 | |||
11884 | /* dev zeroed in init_etherdev */ | 11880 | /* dev zeroed in init_etherdev */ |
11885 | dev = alloc_etherdev_mq(sizeof(*bp), MAX_CONTEXT); | 11881 | dev = alloc_etherdev_mq(sizeof(*bp), MAX_CONTEXT); |
11886 | if (!dev) { | 11882 | if (!dev) { |
@@ -12218,6 +12214,8 @@ static int __init bnx2x_init(void) | |||
12218 | { | 12214 | { |
12219 | int ret; | 12215 | int ret; |
12220 | 12216 | ||
12217 | printk(KERN_INFO "%s", version); | ||
12218 | |||
12221 | bnx2x_wq = create_singlethread_workqueue("bnx2x"); | 12219 | bnx2x_wq = create_singlethread_workqueue("bnx2x"); |
12222 | if (bnx2x_wq == NULL) { | 12220 | if (bnx2x_wq == NULL) { |
12223 | printk(KERN_ERR PFX "Cannot create workqueue\n"); | 12221 | printk(KERN_ERR PFX "Cannot create workqueue\n"); |