diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-10 16:39:39 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-10 16:39:39 -0400 |
commit | de699ad595fb45022d1b049ed91ffd06fdd16c13 (patch) | |
tree | 9fc467c912faafb4d1bd5e16de5fbf537ef2c2f6 /drivers/ide/ide-floppy.c | |
parent | 0c8a6c7aead1d3be85ce53e3aaacd52e38ede03e (diff) |
ide: add ide_do_test_unit_ready() helper
* Add ide_do_test_unit_ready() helper and convert ide-{floppy,tape}.c
to use it.
* Remove no longer used idetape_create_test_unit_ready_cmd().
There should be no functional changes caused by this patch.
Acked-by: Borislav Petkov <petkovbb@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-floppy.c')
-rw-r--r-- | drivers/ide/ide-floppy.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index b221a456e535..4d7e9ef82425 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
@@ -773,7 +773,6 @@ static int idefloppy_open(struct inode *inode, struct file *filp) | |||
773 | struct gendisk *disk = inode->i_bdev->bd_disk; | 773 | struct gendisk *disk = inode->i_bdev->bd_disk; |
774 | struct ide_floppy_obj *floppy; | 774 | struct ide_floppy_obj *floppy; |
775 | ide_drive_t *drive; | 775 | ide_drive_t *drive; |
776 | struct ide_atapi_pc pc; | ||
777 | int ret = 0; | 776 | int ret = 0; |
778 | 777 | ||
779 | debug_log("Reached %s\n", __func__); | 778 | debug_log("Reached %s\n", __func__); |
@@ -790,10 +789,7 @@ static int idefloppy_open(struct inode *inode, struct file *filp) | |||
790 | drive->atapi_flags &= ~IDE_AFLAG_FORMAT_IN_PROGRESS; | 789 | drive->atapi_flags &= ~IDE_AFLAG_FORMAT_IN_PROGRESS; |
791 | /* Just in case */ | 790 | /* Just in case */ |
792 | 791 | ||
793 | ide_init_pc(&pc); | 792 | if (ide_do_test_unit_ready(drive, disk)) |
794 | pc.c[0] = GPCMD_TEST_UNIT_READY; | ||
795 | |||
796 | if (ide_queue_pc_tail(drive, disk, &pc)) | ||
797 | ide_do_start_stop(drive, disk, 1); | 793 | ide_do_start_stop(drive, disk, 1); |
798 | 794 | ||
799 | if (ide_floppy_get_capacity(drive) | 795 | if (ide_floppy_get_capacity(drive) |