diff options
Diffstat (limited to 'drivers/ide/ide-floppy.c')
| -rw-r--r-- | drivers/ide/ide-floppy.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index f39cf404b030..b221a456e535 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
| @@ -359,13 +359,6 @@ void ide_floppy_create_mode_sense_cmd(struct ide_atapi_pc *pc, u8 page_code) | |||
| 359 | pc->req_xfer = length; | 359 | pc->req_xfer = length; |
| 360 | } | 360 | } |
| 361 | 361 | ||
| 362 | static void idefloppy_create_start_stop_cmd(struct ide_atapi_pc *pc, int start) | ||
| 363 | { | ||
| 364 | ide_init_pc(pc); | ||
| 365 | pc->c[0] = GPCMD_START_STOP_UNIT; | ||
| 366 | pc->c[4] = start; | ||
| 367 | } | ||
| 368 | |||
| 369 | static void idefloppy_create_rw_cmd(idefloppy_floppy_t *floppy, | 362 | static void idefloppy_create_rw_cmd(idefloppy_floppy_t *floppy, |
| 370 | struct ide_atapi_pc *pc, struct request *rq, | 363 | struct ide_atapi_pc *pc, struct request *rq, |
| 371 | unsigned long sector) | 364 | unsigned long sector) |
| @@ -800,10 +793,8 @@ static int idefloppy_open(struct inode *inode, struct file *filp) | |||
| 800 | ide_init_pc(&pc); | 793 | ide_init_pc(&pc); |
| 801 | pc.c[0] = GPCMD_TEST_UNIT_READY; | 794 | pc.c[0] = GPCMD_TEST_UNIT_READY; |
| 802 | 795 | ||
| 803 | if (ide_queue_pc_tail(drive, disk, &pc)) { | 796 | if (ide_queue_pc_tail(drive, disk, &pc)) |
| 804 | idefloppy_create_start_stop_cmd(&pc, 1); | 797 | ide_do_start_stop(drive, disk, 1); |
| 805 | (void)ide_queue_pc_tail(drive, disk, &pc); | ||
| 806 | } | ||
| 807 | 798 | ||
| 808 | if (ide_floppy_get_capacity(drive) | 799 | if (ide_floppy_get_capacity(drive) |
| 809 | && (filp->f_flags & O_NDELAY) == 0 | 800 | && (filp->f_flags & O_NDELAY) == 0 |
| @@ -880,10 +871,8 @@ static int ide_floppy_lockdoor(ide_drive_t *drive, struct ide_atapi_pc *pc, | |||
| 880 | 871 | ||
| 881 | ide_set_media_lock(drive, disk, prevent); | 872 | ide_set_media_lock(drive, disk, prevent); |
| 882 | 873 | ||
| 883 | if (cmd == CDROMEJECT) { | 874 | if (cmd == CDROMEJECT) |
| 884 | idefloppy_create_start_stop_cmd(pc, 2); | 875 | ide_do_start_stop(drive, disk, 2); |
| 885 | (void)ide_queue_pc_tail(drive, disk, pc); | ||
| 886 | } | ||
| 887 | 876 | ||
| 888 | return 0; | 877 | return 0; |
| 889 | } | 878 | } |
