aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-probe.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-probe.c')
-rw-r--r--drivers/ide/ide-probe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 58a2caf17903..242cfd09e16b 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -446,7 +446,7 @@ static int do_probe (ide_drive_t *drive, u8 cmd)
446 SELECT_DRIVE(drive); 446 SELECT_DRIVE(drive);
447 msleep(50); 447 msleep(50);
448 448
449 if (ide_read_device(drive) != drive->select.all && present == 0) { 449 if (ide_read_device(drive) != drive->select && present == 0) {
450 if (drive->dn & 1) { 450 if (drive->dn & 1) {
451 /* exit with drive0 selected */ 451 /* exit with drive0 selected */
452 SELECT_DRIVE(&hwif->drives[0]); 452 SELECT_DRIVE(&hwif->drives[0]);
@@ -1211,7 +1211,7 @@ EXPORT_SYMBOL_GPL(ide_unregister_region);
1211void ide_init_disk(struct gendisk *disk, ide_drive_t *drive) 1211void ide_init_disk(struct gendisk *disk, ide_drive_t *drive)
1212{ 1212{
1213 ide_hwif_t *hwif = drive->hwif; 1213 ide_hwif_t *hwif = drive->hwif;
1214 unsigned int unit = (drive->select.all >> 4) & 1; 1214 unsigned int unit = drive->dn & 1;
1215 1215
1216 disk->major = hwif->major; 1216 disk->major = hwif->major;
1217 disk->first_minor = unit << PARTN_BITS; 1217 disk->first_minor = unit << PARTN_BITS;