diff options
Diffstat (limited to 'drivers/ide/ide-atapi.c')
-rw-r--r-- | drivers/ide/ide-atapi.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c index f82ddfb9a44e..c647a40c0d33 100644 --- a/drivers/ide/ide-atapi.c +++ b/drivers/ide/ide-atapi.c | |||
@@ -162,6 +162,21 @@ int ide_queue_pc_tail(ide_drive_t *drive, struct gendisk *disk, | |||
162 | } | 162 | } |
163 | EXPORT_SYMBOL_GPL(ide_queue_pc_tail); | 163 | EXPORT_SYMBOL_GPL(ide_queue_pc_tail); |
164 | 164 | ||
165 | int ide_set_media_lock(ide_drive_t *drive, struct gendisk *disk, int on) | ||
166 | { | ||
167 | struct ide_atapi_pc pc; | ||
168 | |||
169 | if (drive->atapi_flags & IDE_AFLAG_NO_DOORLOCK) | ||
170 | return 0; | ||
171 | |||
172 | ide_init_pc(&pc); | ||
173 | pc.c[0] = ALLOW_MEDIUM_REMOVAL; | ||
174 | pc.c[4] = on; | ||
175 | |||
176 | return ide_queue_pc_tail(drive, disk, &pc); | ||
177 | } | ||
178 | EXPORT_SYMBOL_GPL(ide_set_media_lock); | ||
179 | |||
165 | /* TODO: unify the code thus making some arguments go away */ | 180 | /* TODO: unify the code thus making some arguments go away */ |
166 | ide_startstop_t ide_pc_intr(ide_drive_t *drive, struct ide_atapi_pc *pc, | 181 | ide_startstop_t ide_pc_intr(ide_drive_t *drive, struct ide_atapi_pc *pc, |
167 | ide_handler_t *handler, unsigned int timeout, ide_expiry_t *expiry, | 182 | ide_handler_t *handler, unsigned int timeout, ide_expiry_t *expiry, |