RE: [PATCH] CCISS: Don't print driver version until we actually find a device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 

> -----Original Message-----
> From: Helgaas, Bjorn 
> Sent: Tuesday, July 25, 2006 5:37 PM
> To: Andrew Morton
> Cc: Miller, Mike (OS Dev); ISS StorageDev; 
> [email protected]
> 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 <[email protected]>

Acked-by: Mike Miller <[email protected]>

> 
> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux