]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
cciss: fix regression that no device nodes are created if no logical drives are confi...
authorStephen M. Cameron <scameron@beardog.cca.cpqcorp.net>
Fri, 4 Jul 2008 16:59:40 +0000 (09:59 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 4 Jul 2008 17:40:06 +0000 (10:40 -0700)
Fix regression in cciss driver that if no logical drives are configured,
no device nodes at all get created.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cca.cpqcorp.net>
Acked-by: Mike Miller <mike.miller@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/block/cciss.c

index 5f1e1cc6165a91b5b5388dcabc8bac06d13db782..f5521051a8dc4355c622b1350c13377f02c537ea 100644 (file)
@@ -3546,6 +3546,10 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
        for (j = 0; j <= hba[i]->highest_lun; j++)
                add_disk(hba[i]->gendisk[j]);
 
+       /* we must register the controller even if no disks exist */
+       if (hba[i]->highest_lun == -1)
+               add_disk(hba[i]->gendisk[0]);
+
        return 1;
 
       clean4: