Commit 01225f82 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Linus Torvalds

[PATCH] kill default_shutdown() and ide_drive_t->shutdown

parent bd877aaf
......@@ -642,10 +642,9 @@ void ide_unregister (unsigned int index)
drive = &hwif->drives[unit];
if (!drive->present)
continue;
if (drive->usage)
goto abort;
if (DRIVER(drive)->shutdown(drive))
if (drive->usage || DRIVER(drive)->busy)
goto abort;
drive->dead = 1;
}
hwif->present = 0;
......@@ -2169,20 +2168,6 @@ static int default_cleanup (ide_drive_t *drive)
return ide_unregister_subdriver(drive);
}
/*
* Check if we can unregister the subdriver. Called with the
* request lock held.
*/
static int default_shutdown(ide_drive_t *drive)
{
if (drive->usage || DRIVER(drive)->busy) {
return 1;
}
drive->dead = 1;
return 0;
}
/*
* Default function to use for the cache flush operation. This
* must be replaced for disk devices (see ATA specification
......@@ -2259,7 +2244,6 @@ static ide_startstop_t default_start_power_step(ide_drive_t *drive,
static void setup_driver_defaults (ide_driver_t *d)
{
if (d->cleanup == NULL) d->cleanup = default_cleanup;
if (d->shutdown == NULL) d->shutdown = default_shutdown;
if (d->flushcache == NULL) d->flushcache = default_flushcache;
if (d->do_request == NULL) d->do_request = default_do_request;
if (d->end_request == NULL) d->end_request = default_end_request;
......
......@@ -1160,7 +1160,6 @@ typedef struct ide_driver_s {
unsigned busy : 1;
unsigned supports_dsc_overlap : 1;
int (*cleanup)(ide_drive_t *);
int (*shutdown)(ide_drive_t *);
int (*flushcache)(ide_drive_t *);
ide_startstop_t (*do_request)(ide_drive_t *, struct request *, sector_t);
int (*end_request)(ide_drive_t *, int, int);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment