public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] CCISS: Don't print driver version until we actually find a device
@ 2006-07-25 22:36 Bjorn Helgaas
  2006-07-25 22:43 ` Jesper Juhl
  2006-07-26 14:22 ` Miller, Mike (OS Dev)
  0 siblings, 2 replies; 11+ messages in thread
From: Bjorn Helgaas @ 2006-07-25 22:36 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Mike Miller, iss_storagedev, linux-kernel

If we don't find any devices, we shouldn't print anything.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.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);
 }
 

^ permalink raw reply	[flat|nested] 11+ messages in thread
[parent not found: <6CDJo-8vC-31@gated-at.bofh.it>]

end of thread, other threads:[~2006-07-27 13:56 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-25 22:36 [PATCH] CCISS: Don't print driver version until we actually find a device Bjorn Helgaas
2006-07-25 22:43 ` Jesper Juhl
2006-07-25 22:47   ` Arjan van de Ven
2006-07-25 22:51     ` Bjorn Helgaas
2006-07-25 22:53       ` Jesper Juhl
2006-07-26  4:41     ` Jeff Garzik
2006-07-27 13:01       ` Dmitry Torokhov
2006-07-27 13:28         ` gmu 2k6
2006-07-27 13:56           ` Dmitry Torokhov
2006-07-26 14:22 ` Miller, Mike (OS Dev)
     [not found] <6CDJo-8vC-31@gated-at.bofh.it>
     [not found] ` <6CDSZ-h7-9@gated-at.bofh.it>
2006-07-25 23:14   ` Bodo Eggert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox