From af71d0806395916c327e94906e001eaec7fbc65d Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Fri, 27 Mar 2009 12:46:26 +0100 Subject: [PATCH] --- yaml --- r: 137637 b: refs/heads/master c: 69197ad70ef6b854988299c1377864f9755cd03d h: refs/heads/master i: 137635: c9b89ded60951def3682d1adcb7317afd584b3dc v: v3 --- [refs] | 2 +- trunk/drivers/ide/ide-probe.c | 22 +++++++++------------- trunk/include/linux/ide.h | 2 -- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/[refs] b/[refs] index 7fd5cfccf8c4..c4b0cd2fee2a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 304ffd6d3a145901ac570b8afb6c9936a83c3392 +refs/heads/master: 69197ad70ef6b854988299c1377864f9755cd03d diff --git a/trunk/drivers/ide/ide-probe.c b/trunk/drivers/ide/ide-probe.c index a3edbb5d0452..4b00945cf7d1 100644 --- a/trunk/drivers/ide/ide-probe.c +++ b/trunk/drivers/ide/ide-probe.c @@ -228,15 +228,9 @@ static void do_identify(ide_drive_t *drive, u8 cmd, u16 *id) m[ATA_ID_PROD_LEN - 1] = '\0'; if (strstr(m, "E X A B Y T E N E S T")) - goto err_misc; - - drive->dev_flags |= IDE_DFLAG_PRESENT; - drive->dev_flags &= ~IDE_DFLAG_DEAD; - - return; -err_misc: - kfree(id); - drive->dev_flags &= ~IDE_DFLAG_PRESENT; + drive->dev_flags &= ~IDE_DFLAG_PRESENT; + else + drive->dev_flags |= IDE_DFLAG_PRESENT; } /** @@ -505,8 +499,7 @@ static u8 probe_for_drive(ide_drive_t *drive) } if ((drive->dev_flags & IDE_DFLAG_PRESENT) == 0) - /* drive not found */ - return 0; + goto out_free; /* identification failed? */ if ((drive->dev_flags & IDE_DFLAG_ID_READ) == 0) { @@ -530,7 +523,7 @@ static u8 probe_for_drive(ide_drive_t *drive) } if ((drive->dev_flags & IDE_DFLAG_PRESENT) == 0) - return 0; + goto out_free; /* The drive wasn't being helpful. Add generic info only */ if ((drive->dev_flags & IDE_DFLAG_ID_READ) == 0) { @@ -543,7 +536,10 @@ static u8 probe_for_drive(ide_drive_t *drive) ide_disk_init_mult_count(drive); } - return !!(drive->dev_flags & IDE_DFLAG_PRESENT); + return 1; +out_free: + kfree(drive->id); + return 0; } static void hwif_release_dev(struct device *dev) diff --git a/trunk/include/linux/ide.h b/trunk/include/linux/ide.h index 47878719c56b..ab8ee4f32f52 100644 --- a/trunk/include/linux/ide.h +++ b/trunk/include/linux/ide.h @@ -494,8 +494,6 @@ enum { IDE_DFLAG_NICE1 = (1 << 5), /* device is physically present */ IDE_DFLAG_PRESENT = (1 << 6), - /* device ejected hint */ - IDE_DFLAG_DEAD = (1 << 7), /* id read from device (synthetic if not set) */ IDE_DFLAG_ID_READ = (1 << 8), IDE_DFLAG_NOPROBE = (1 << 9),