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>
This commit is contained in:
committed by
Roland Dreier
parent
181c74e87e
commit
f1aa78b26e
@@ -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++;
|
||||
|
Reference in New Issue
Block a user