diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-10 16:39:38 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-10 16:39:38 -0400 |
commit | 0578042db3191e1ac76b53d213f2a691c3e1eaed (patch) | |
tree | 70f24c393a47e8e7906775e177372fb1348c2e56 /include | |
parent | 0127854d7c96612a454bed6de242e28f8021fa7f (diff) |
ide: add ide_set_media_lock() helper
* Set IDE_AFLAG_NO_DOORLOCK in idetape_get_mode_sense_result(), check it
in ide_tape_set_media_lock() and cleanup idetape_create_prevent_cmd().
* Set IDE_AFLAG_NO_DOORLOCK in ide_floppy_create_read_capacity_cmd() and
check it instead of IDE_AFLAG_CLIK_DRIVE in ide_floppy_set_media_lock().
* Add ide_set_media_lock() helper and convert ide-{floppy,tape}.c to use it.
* Remove no longer used ide*_create_prevent_cmd()/ide*_set_media_lock().
* Update comment in <linux/ide.h> accordingly.
Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ide.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h index cc41a885688a..ac067a3c1be3 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -317,10 +317,10 @@ struct ide_acpi_hwif_link; | |||
317 | enum { | 317 | enum { |
318 | IDE_AFLAG_DRQ_INTERRUPT = (1 << 0), | 318 | IDE_AFLAG_DRQ_INTERRUPT = (1 << 0), |
319 | IDE_AFLAG_MEDIA_CHANGED = (1 << 1), | 319 | IDE_AFLAG_MEDIA_CHANGED = (1 << 1), |
320 | |||
321 | /* ide-cd */ | ||
322 | /* Drive cannot lock the door. */ | 320 | /* Drive cannot lock the door. */ |
323 | IDE_AFLAG_NO_DOORLOCK = (1 << 2), | 321 | IDE_AFLAG_NO_DOORLOCK = (1 << 2), |
322 | |||
323 | /* ide-cd */ | ||
324 | /* Drive cannot eject the disc. */ | 324 | /* Drive cannot eject the disc. */ |
325 | IDE_AFLAG_NO_EJECT = (1 << 3), | 325 | IDE_AFLAG_NO_EJECT = (1 << 3), |
326 | /* Drive is a pre ATAPI 1.2 drive. */ | 326 | /* Drive is a pre ATAPI 1.2 drive. */ |
@@ -1142,6 +1142,8 @@ void ide_queue_pc_head(ide_drive_t *, struct gendisk *, struct ide_atapi_pc *, | |||
1142 | struct request *); | 1142 | struct request *); |
1143 | int ide_queue_pc_tail(ide_drive_t *, struct gendisk *, struct ide_atapi_pc *); | 1143 | int ide_queue_pc_tail(ide_drive_t *, struct gendisk *, struct ide_atapi_pc *); |
1144 | 1144 | ||
1145 | int ide_set_media_lock(ide_drive_t *, struct gendisk *, int); | ||
1146 | |||
1145 | ide_startstop_t ide_pc_intr(ide_drive_t *drive, struct ide_atapi_pc *pc, | 1147 | ide_startstop_t ide_pc_intr(ide_drive_t *drive, struct ide_atapi_pc *pc, |
1146 | ide_handler_t *handler, unsigned int timeout, ide_expiry_t *expiry, | 1148 | ide_handler_t *handler, unsigned int timeout, ide_expiry_t *expiry, |
1147 | void (*update_buffers)(ide_drive_t *, struct ide_atapi_pc *), | 1149 | void (*update_buffers)(ide_drive_t *, struct ide_atapi_pc *), |