aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 16:39:24 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 16:39:24 -0400
commit2a924662b646fa25cb491d50aa1202a94aa4ac55 (patch)
tree9339ca9cbc1600149a91a6b0fa919ef0d3b6ec3d /drivers/ide
parent3cd5f1eae093a7d6ff8a63c746eba9d6f689ba91 (diff)
ide: remove needless drive->present checks from device drivers
Remove needless drive->present checks from ->probe methods (device model takes care of that). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-cd.c4
-rw-r--r--drivers/ide/ide-disk.c3
-rw-r--r--drivers/ide/ide-floppy.c4
-rw-r--r--drivers/ide/ide-tape.c4
4 files changed, 7 insertions, 8 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index accb53b85ba7..607af5de16f8 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -2109,10 +2109,10 @@ static int ide_cd_probe(ide_drive_t *drive)
2109 2109
2110 if (!strstr("ide-cdrom", drive->driver_req)) 2110 if (!strstr("ide-cdrom", drive->driver_req))
2111 goto failed; 2111 goto failed;
2112 if (!drive->present) 2112
2113 goto failed;
2114 if (drive->media != ide_cdrom && drive->media != ide_optical) 2113 if (drive->media != ide_cdrom && drive->media != ide_optical)
2115 goto failed; 2114 goto failed;
2115
2116 /* skip drives that we were told to ignore */ 2116 /* skip drives that we were told to ignore */
2117 if (ignore != NULL) { 2117 if (ignore != NULL) {
2118 if (strstr(ignore, drive->name)) { 2118 if (strstr(ignore, drive->name)) {
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index edfa63750dde..eeb2c3b22e97 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -1136,8 +1136,7 @@ static int ide_disk_probe(ide_drive_t *drive)
1136 /* strstr("foo", "") is non-NULL */ 1136 /* strstr("foo", "") is non-NULL */
1137 if (!strstr("ide-disk", drive->driver_req)) 1137 if (!strstr("ide-disk", drive->driver_req))
1138 goto failed; 1138 goto failed;
1139 if (!drive->present) 1139
1140 goto failed;
1141 if (drive->media != ide_disk) 1140 if (drive->media != ide_disk)
1142 goto failed; 1141 goto failed;
1143 1142
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index 59baa9643f8b..327960380908 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -1390,10 +1390,10 @@ static int ide_floppy_probe(ide_drive_t *drive)
1390 1390
1391 if (!strstr("ide-floppy", drive->driver_req)) 1391 if (!strstr("ide-floppy", drive->driver_req))
1392 goto failed; 1392 goto failed;
1393 if (!drive->present) 1393
1394 goto failed;
1395 if (drive->media != ide_floppy) 1394 if (drive->media != ide_floppy)
1396 goto failed; 1395 goto failed;
1396
1397 if (!idefloppy_identify_device(drive, drive->id)) { 1397 if (!idefloppy_identify_device(drive, drive->id)) {
1398 printk(KERN_ERR "ide-floppy: %s: not supported by this version" 1398 printk(KERN_ERR "ide-floppy: %s: not supported by this version"
1399 " of ide-floppy\n", drive->name); 1399 " of ide-floppy\n", drive->name);
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 2745e5d26848..874e60fc85d1 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -2647,10 +2647,10 @@ static int ide_tape_probe(ide_drive_t *drive)
2647 2647
2648 if (!strstr("ide-tape", drive->driver_req)) 2648 if (!strstr("ide-tape", drive->driver_req))
2649 goto failed; 2649 goto failed;
2650 if (!drive->present) 2650
2651 goto failed;
2652 if (drive->media != ide_tape) 2651 if (drive->media != ide_tape)
2653 goto failed; 2652 goto failed;
2653
2654 if (!idetape_identify_device(drive)) { 2654 if (!idetape_identify_device(drive)) {
2655 printk(KERN_ERR "ide-tape: %s: not supported by this version of" 2655 printk(KERN_ERR "ide-tape: %s: not supported by this version of"
2656 " the driver\n", drive->name); 2656 " the driver\n", drive->name);