Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=68f3948dab39249d178eb007c071f87fb6481fc6
Commit:     68f3948dab39249d178eb007c071f87fb6481fc6
Parent:     1d368c546566e249da8181e933c53788093965cf
Author:     Roland Dreier <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 4 20:20:44 2008 -0800
Committer:  Roland Dreier <[EMAIL PROTECTED]>
CommitDate: Mon Feb 4 20:20:44 2008 -0800

    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 <[EMAIL PROTECTED]>
---
 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 d2f50b6..96a39b5 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");
 MODULE_LICENSE("Dual BSD/GPL");
 MODULE_VERSION(DRV_VERSION);
 
-static const char mlx4_ib_version[] __devinitdata =
+static const char mlx4_ib_version[] =
        DRV_NAME ": Mellanox ConnectX InfiniBand driver v"
        DRV_VERSION " (" DRV_RELDATE ")\n";
 
@@ -517,9 +517,16 @@ static struct class_device_attribute 
*mlx4_class_attributes[] = {
 
 static void *mlx4_ib_add(struct mlx4_dev *dev)
 {
+       static int mlx4_ib_version_printed;
        struct mlx4_ib_dev *ibdev;
        int i;
 
+
+       if (!mlx4_ib_version_printed) {
+               printk(KERN_INFO "%s", mlx4_ib_version);
+               ++mlx4_ib_version_printed;
+       }
+
        ibdev = (struct mlx4_ib_dev *) ib_alloc_device(sizeof *ibdev);
        if (!ibdev) {
                dev_err(&dev->pdev->dev, "Device struct alloc failed\n");
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to