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>

+8 -1
+8 -1
drivers/infiniband/hw/mlx4/main.c
··· 52 52 MODULE_LICENSE("Dual BSD/GPL"); 53 53 MODULE_VERSION(DRV_VERSION); 54 54 55 - static const char mlx4_ib_version[] __devinitdata = 55 + static const char mlx4_ib_version[] = 56 56 DRV_NAME ": Mellanox ConnectX InfiniBand driver v" 57 57 DRV_VERSION " (" DRV_RELDATE ")\n"; 58 58 ··· 517 517 518 518 static void *mlx4_ib_add(struct mlx4_dev *dev) 519 519 { 520 + static int mlx4_ib_version_printed; 520 521 struct mlx4_ib_dev *ibdev; 521 522 int i; 523 + 524 + 525 + if (!mlx4_ib_version_printed) { 526 + printk(KERN_INFO "%s", mlx4_ib_version); 527 + ++mlx4_ib_version_printed; 528 + } 522 529 523 530 ibdev = (struct mlx4_ib_dev *) ib_alloc_device(sizeof *ibdev); 524 531 if (!ibdev) {