[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <200607251636.42765.bjorn.helgaas@hp.com>
Date: Tue, 25 Jul 2006 16:36:42 -0600
From: Bjorn Helgaas <bjorn.helgaas@...com>
To: Andrew Morton <akpm@...l.org>
Cc: Mike Miller <mike.miller@...com>, iss_storagedev@...com,
linux-kernel@...r.kernel.org
Subject: [PATCH] CCISS: Don't print driver version until we actually find a device
If we don't find any devices, we shouldn't print anything.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@...com>
Index: work-mm2/drivers/block/cciss.c
===================================================================
--- work-mm2.orig/drivers/block/cciss.c 2006-07-20 16:27:34.000000000 -0600
+++ work-mm2/drivers/block/cciss.c 2006-07-25 16:16:27.000000000 -0600
@@ -3109,12 +3109,16 @@
static int __devinit cciss_init_one(struct pci_dev *pdev,
const struct pci_device_id *ent)
{
+ static int cciss_version_printed = 0;
request_queue_t *q;
int i;
int j;
int rc;
int dac;
+ if (cciss_version_printed++ == 0)
+ printk(KERN_INFO DRIVER_NAME "\n");
+
i = alloc_cciss_hba();
if (i < 0)
return -1;
@@ -3370,9 +3374,6 @@
*/
static int __init cciss_init(void)
{
- printk(KERN_INFO DRIVER_NAME "\n");
-
- /* Register for our PCI devices */
return pci_register_driver(&cciss_pci_driver);
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists