diff options
author | Roland Dreier <rolandd@cisco.com> | 2008-02-04 23:20:44 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-02-04 23:20:44 -0500 |
commit | 68f3948dab39249d178eb007c071f87fb6481fc6 (patch) | |
tree | c67659a811309d0e63d8570a64ce934c9febc2fd /drivers/infiniband/hw | |
parent | 1d368c546566e249da8181e933c53788093965cf (diff) |
IB/mlx4: Actually print out the driver version
The string mlx4_ib_version was defined, but never used. Print out the
version once when the first device is initialized.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r-- | drivers/infiniband/hw/mlx4/main.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index d2f50b62fcb6..96a39b5c9254 100644 --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c | |||
@@ -52,7 +52,7 @@ MODULE_DESCRIPTION("Mellanox ConnectX HCA InfiniBand driver"); | |||
52 | MODULE_LICENSE("Dual BSD/GPL"); | 52 | MODULE_LICENSE("Dual BSD/GPL"); |
53 | MODULE_VERSION(DRV_VERSION); | 53 | MODULE_VERSION(DRV_VERSION); |
54 | 54 | ||
55 | static const char mlx4_ib_version[] __devinitdata = | 55 | static const char mlx4_ib_version[] = |
56 | DRV_NAME ": Mellanox ConnectX InfiniBand driver v" | 56 | DRV_NAME ": Mellanox ConnectX InfiniBand driver v" |
57 | DRV_VERSION " (" DRV_RELDATE ")\n"; | 57 | DRV_VERSION " (" DRV_RELDATE ")\n"; |
58 | 58 | ||
@@ -517,9 +517,16 @@ static struct class_device_attribute *mlx4_class_attributes[] = { | |||
517 | 517 | ||
518 | static void *mlx4_ib_add(struct mlx4_dev *dev) | 518 | static void *mlx4_ib_add(struct mlx4_dev *dev) |
519 | { | 519 | { |
520 | static int mlx4_ib_version_printed; | ||
520 | struct mlx4_ib_dev *ibdev; | 521 | struct mlx4_ib_dev *ibdev; |
521 | int i; | 522 | int i; |
522 | 523 | ||
524 | |||
525 | if (!mlx4_ib_version_printed) { | ||
526 | printk(KERN_INFO "%s", mlx4_ib_version); | ||
527 | ++mlx4_ib_version_printed; | ||
528 | } | ||
529 | |||
523 | ibdev = (struct mlx4_ib_dev *) ib_alloc_device(sizeof *ibdev); | 530 | ibdev = (struct mlx4_ib_dev *) ib_alloc_device(sizeof *ibdev); |
524 | if (!ibdev) { | 531 | if (!ibdev) { |
525 | dev_err(&dev->pdev->dev, "Device struct alloc failed\n"); | 532 | dev_err(&dev->pdev->dev, "Device struct alloc failed\n"); |