summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/mthca/mthca_main.c
diff options
context:
space:
mode:
authorMarcin Slusarz <marcin.slusarz@gmail.com>2009-09-06 07:24:24 +0400
committerRoland Dreier <rolandd@cisco.com>2009-09-06 07:24:24 +0400
commitf1aa78b26e8dabc2956be94a93c40c6cc08eb4a3 (patch)
tree16a824455bdc6533996c03784f7a45d6722a41e5 /drivers/infiniband/hw/mthca/mthca_main.c
parent181c74e87eb93df447a759af93cf0a279875ea7d (diff)
downloadlinux-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/mthca/mthca_main.c')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_main.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c
index 13da9f1d24c0..2e4e04303786 100644
--- a/drivers/infiniband/hw/mthca/mthca_main.c
+++ b/drivers/infiniband/hw/mthca/mthca_main.c
@@ -1215,15 +1215,11 @@ int __mthca_restart_one(struct pci_dev *pdev)
static int __devinit mthca_init_one(struct pci_dev *pdev,
const struct pci_device_id *id)
{
- static int mthca_version_printed = 0;
int ret;
mutex_lock(&mthca_device_mutex);
- if (!mthca_version_printed) {
- printk(KERN_INFO "%s", mthca_version);
- ++mthca_version_printed;
- }
+ printk_once(KERN_INFO "%s", mthca_version);
if (id->driver_data >= ARRAY_SIZE(mthca_hca_table)) {
printk(KERN_ERR PFX "%s has invalid driver data %lx\n",