Преглед на файлове

cciss: fix regression that no device nodes are created if no logical drives are configured.

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>
Stephen M. Cameron преди 17 години
родител
ревизия
77b96bd7e5
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  1. 4 0
      drivers/block/cciss.c

+ 4 - 0
drivers/block/cciss.c

@@ -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: