diff options
| author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-10 16:39:36 -0400 |
|---|---|---|
| committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-10 16:39:36 -0400 |
| commit | 4de4b9e1405aef41d199dd20dbce7e9a5dbbf7bf (patch) | |
| tree | 997f34475317d5c640f4164dba081169e920f543 | |
| parent | 2e8a6f89de69d149bde135c2dc89daa9127984a9 (diff) | |
ide-floppy: remove MODE_SENSE_* defines
Only MODE_SENSE_CURRENT (0x00) is ever used so just remove
these defines and then drop no longer needed 'type' argument
from idefloppy_create_mode_sense_cmd().
Cc: Borislav Petkov <petkovbb@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| -rw-r--r-- | drivers/ide/ide-floppy.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index 58cd6e6c687d..a0a8ad3a3038 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
| @@ -124,12 +124,6 @@ typedef struct ide_floppy_obj { | |||
| 124 | 124 | ||
| 125 | #define IDEFLOPPY_TICKS_DELAY HZ/20 /* default delay for ZIP 100 (50ms) */ | 125 | #define IDEFLOPPY_TICKS_DELAY HZ/20 /* default delay for ZIP 100 (50ms) */ |
| 126 | 126 | ||
| 127 | /* Defines for the MODE SENSE command */ | ||
| 128 | #define MODE_SENSE_CURRENT 0x00 | ||
| 129 | #define MODE_SENSE_CHANGEABLE 0x01 | ||
| 130 | #define MODE_SENSE_DEFAULT 0x02 | ||
| 131 | #define MODE_SENSE_SAVED 0x03 | ||
| 132 | |||
| 133 | /* IOCTLs used in low-level formatting. */ | 127 | /* IOCTLs used in low-level formatting. */ |
| 134 | #define IDEFLOPPY_IOCTL_FORMAT_SUPPORTED 0x4600 | 128 | #define IDEFLOPPY_IOCTL_FORMAT_SUPPORTED 0x4600 |
| 135 | #define IDEFLOPPY_IOCTL_FORMAT_GET_CAPACITY 0x4601 | 129 | #define IDEFLOPPY_IOCTL_FORMAT_GET_CAPACITY 0x4601 |
| @@ -501,14 +495,14 @@ static void idefloppy_create_format_unit_cmd(struct ide_atapi_pc *pc, int b, | |||
| 501 | 495 | ||
| 502 | /* A mode sense command is used to "sense" floppy parameters. */ | 496 | /* A mode sense command is used to "sense" floppy parameters. */ |
| 503 | static void idefloppy_create_mode_sense_cmd(struct ide_atapi_pc *pc, | 497 | static void idefloppy_create_mode_sense_cmd(struct ide_atapi_pc *pc, |
| 504 | u8 page_code, u8 type) | 498 | u8 page_code) |
| 505 | { | 499 | { |
| 506 | u16 length = 8; /* sizeof(Mode Parameter Header) = 8 Bytes */ | 500 | u16 length = 8; /* sizeof(Mode Parameter Header) = 8 Bytes */ |
| 507 | 501 | ||
| 508 | idefloppy_init_pc(pc); | 502 | idefloppy_init_pc(pc); |
| 509 | pc->c[0] = GPCMD_MODE_SENSE_10; | 503 | pc->c[0] = GPCMD_MODE_SENSE_10; |
| 510 | pc->c[1] = 0; | 504 | pc->c[1] = 0; |
| 511 | pc->c[2] = page_code + (type << 6); | 505 | pc->c[2] = page_code; |
| 512 | 506 | ||
| 513 | switch (page_code) { | 507 | switch (page_code) { |
| 514 | case IDEFLOPPY_CAPABILITIES_PAGE: | 508 | case IDEFLOPPY_CAPABILITIES_PAGE: |
| @@ -669,8 +663,7 @@ static int ide_floppy_get_flexible_disk_page(ide_drive_t *drive) | |||
| 669 | u16 transfer_rate, sector_size, cyls, rpm; | 663 | u16 transfer_rate, sector_size, cyls, rpm; |
| 670 | u8 heads, sectors; | 664 | u8 heads, sectors; |
| 671 | 665 | ||
| 672 | idefloppy_create_mode_sense_cmd(&pc, IDEFLOPPY_FLEXIBLE_DISK_PAGE, | 666 | idefloppy_create_mode_sense_cmd(&pc, IDEFLOPPY_FLEXIBLE_DISK_PAGE); |
| 673 | MODE_SENSE_CURRENT); | ||
| 674 | 667 | ||
| 675 | if (idefloppy_queue_pc_tail(drive, &pc)) { | 668 | if (idefloppy_queue_pc_tail(drive, &pc)) { |
| 676 | printk(KERN_ERR "ide-floppy: Can't get flexible disk page" | 669 | printk(KERN_ERR "ide-floppy: Can't get flexible disk page" |
| @@ -718,10 +711,10 @@ static int idefloppy_get_sfrp_bit(ide_drive_t *drive) | |||
| 718 | struct ide_atapi_pc pc; | 711 | struct ide_atapi_pc pc; |
| 719 | 712 | ||
| 720 | floppy->srfp = 0; | 713 | floppy->srfp = 0; |
| 721 | idefloppy_create_mode_sense_cmd(&pc, IDEFLOPPY_CAPABILITIES_PAGE, | ||
| 722 | MODE_SENSE_CURRENT); | ||
| 723 | 714 | ||
| 715 | idefloppy_create_mode_sense_cmd(&pc, IDEFLOPPY_CAPABILITIES_PAGE); | ||
| 724 | pc.flags |= PC_FLAG_SUPPRESS_ERROR; | 716 | pc.flags |= PC_FLAG_SUPPRESS_ERROR; |
| 717 | |||
| 725 | if (idefloppy_queue_pc_tail(drive, &pc)) | 718 | if (idefloppy_queue_pc_tail(drive, &pc)) |
| 726 | return 1; | 719 | return 1; |
| 727 | 720 | ||
