patch-2.3.50 linux/drivers/block/ide-probe.c

Next file: linux/drivers/block/ide-proc.c
Previous file: linux/drivers/block/ide-pmac.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.49/linux/drivers/block/ide-probe.c linux/drivers/block/ide-probe.c
@@ -686,6 +686,7 @@
 	struct gendisk *gd, **gdp;
 	unsigned int unit, units, minors;
 	int *bs, *max_sect, *max_ra;
+	extern devfs_handle_t ide_devfs_handle;
 
 	/* figure out maximum drive number on the interface */
 	for (units = MAX_DRIVES; units > 0; --units) {
@@ -742,11 +743,11 @@
 			char name[64];
 
 			ide_add_generic_settings(hwif->drives + unit);
-			sprintf (name, "ide/host%d/bus%d/target%d/lun%d",
-				 hwif->channel ? hwif->mate->index : hwif->index,
+			sprintf (name, "host%d/bus%d/target%d/lun%d",
+				 (hwif->channel && hwif->mate) ? hwif->mate->index : hwif->index,
 				 hwif->channel, unit, 0);
 			hwif->drives[unit].de =
-				devfs_mk_dir (NULL, name, 0, NULL);
+				devfs_mk_dir (ide_devfs_handle, name, 0, NULL);
 		}
 	}
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)