]> git.hungrycats.org Git - linux/commitdiff
[PATCH] kill default_shutdown() and ide_drive_t->shutdown
authorBartlomiej Zolnierkiewicz <b.zolnierkiewicz@elka.pw.edu.pl>
Thu, 19 Feb 2004 13:42:50 +0000 (05:42 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 19 Feb 2004 13:42:50 +0000 (05:42 -0800)
drivers/ide/ide.c
include/linux/ide.h

index d72c5d6a08633c143a8c9d91b886fc09208f3832..e8cb1886e72979000c0dc8766710fde1d66a465d 100644 (file)
@@ -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;
index 8dcca646dd92cc6b5f1e9ebebd2d2dfad4d68223..8ad1539d05b5388768d50a5f11eb063ec4617fbb 100644 (file)
@@ -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);