diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2009-09-06 03:24:24 (GMT) |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2009-09-06 03:24:24 (GMT) |
commit | f1aa78b26e8dabc2956be94a93c40c6cc08eb4a3 (patch) | |
tree | 16a824455bdc6533996c03784f7a45d6722a41e5 /drivers/infiniband/hw/mlx4 | |
parent | 181c74e87eb93df447a759af93cf0a279875ea7d (diff) | |
download | linux-fsl-qoriq-f1aa78b26e8dabc2956be94a93c40c6cc08eb4a3.tar.xz |
IB: Use printk_once() for driver versions
Replace open-coded reimplementations with printk_once().
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx4')
-rw-r--r-- | drivers/infiniband/hw/mlx4/main.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index ae3d759..0b2f77a 100644 --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c @@ -540,15 +540,11 @@ static struct 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 num_ports = 0; int i; - if (!mlx4_ib_version_printed) { - printk(KERN_INFO "%s", mlx4_ib_version); - ++mlx4_ib_version_printed; - } + printk_once(KERN_INFO "%s", mlx4_ib_version); mlx4_foreach_port(i, dev, MLX4_PORT_TYPE_IB) num_ports++; |