ide-cd: remove unused and write-only struct ide_cd_config_flags fields

unused fields:
* ->writing
* ->reserved

write-only fields:
* ->playmsf_as_bcd
* ->subchan_as_bcd
* ->test_write
* ->supp_disc_present

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
Bartlomiej Zolnierkiewicz 2008-02-01 23:09:19 +01:00
parent b8d25dee3b
commit 2609d06d36
2 changed files with 2 additions and 23 deletions

View File

@ -2693,8 +2693,6 @@ int ide_cdrom_probe_capabilities (ide_drive_t *drive)
CDROM_CONFIG_FLAGS(drive)->cd_rw = 1; CDROM_CONFIG_FLAGS(drive)->cd_rw = 1;
CDROM_CONFIG_FLAGS(drive)->ram = 1; CDROM_CONFIG_FLAGS(drive)->ram = 1;
} }
if (cap.test_write)
CDROM_CONFIG_FLAGS(drive)->test_write = 1;
if (cap.dvd_ram_read || cap.dvd_r_read || cap.dvd_rom) if (cap.dvd_ram_read || cap.dvd_r_read || cap.dvd_rom)
CDROM_CONFIG_FLAGS(drive)->dvd = 1; CDROM_CONFIG_FLAGS(drive)->dvd = 1;
if (cap.dvd_ram_write) { if (cap.dvd_ram_write) {
@ -2727,10 +2725,9 @@ int ide_cdrom_probe_capabilities (ide_drive_t *drive)
#endif /* not STANDARD_ATAPI */ #endif /* not STANDARD_ATAPI */
if (cap.mechtype == mechtype_individual_changer || if (cap.mechtype == mechtype_individual_changer ||
cap.mechtype == mechtype_cartridge_changer) { cap.mechtype == mechtype_cartridge_changer) {
if ((nslots = cdrom_number_of_slots(cdi)) > 1) { nslots = cdrom_number_of_slots(cdi);
if (nslots > 1)
CDROM_CONFIG_FLAGS(drive)->is_changer = 1; CDROM_CONFIG_FLAGS(drive)->is_changer = 1;
CDROM_CONFIG_FLAGS(drive)->supp_disc_present = 1;
}
} }
ide_cdrom_update_speed(drive, &cap); ide_cdrom_update_speed(drive, &cap);
@ -2892,10 +2889,7 @@ int ide_cdrom_setup (ide_drive_t *drive)
Some versions of this drive like to talk BCD. */ Some versions of this drive like to talk BCD. */
CDROM_CONFIG_FLAGS(drive)->toctracks_as_bcd = 1; CDROM_CONFIG_FLAGS(drive)->toctracks_as_bcd = 1;
CDROM_CONFIG_FLAGS(drive)->tocaddr_as_bcd = 1; CDROM_CONFIG_FLAGS(drive)->tocaddr_as_bcd = 1;
CDROM_CONFIG_FLAGS(drive)->playmsf_as_bcd = 1;
CDROM_CONFIG_FLAGS(drive)->subchan_as_bcd = 1;
} }
else if (strcmp (drive->id->model, "V006E0DS") == 0 && else if (strcmp (drive->id->model, "V006E0DS") == 0 &&
drive->id->fw_rev[4] == '1' && drive->id->fw_rev[4] == '1' &&
drive->id->fw_rev[6] <= '2') { drive->id->fw_rev[6] <= '2') {
@ -2908,16 +2902,8 @@ int ide_cdrom_setup (ide_drive_t *drive)
This drive was released before the 1.2 version This drive was released before the 1.2 version
of the spec. */ of the spec. */
CDROM_CONFIG_FLAGS(drive)->tocaddr_as_bcd = 1; CDROM_CONFIG_FLAGS(drive)->tocaddr_as_bcd = 1;
CDROM_CONFIG_FLAGS(drive)->playmsf_as_bcd = 1;
CDROM_CONFIG_FLAGS(drive)->subchan_as_bcd = 1;
CDROM_CONFIG_FLAGS(drive)->nec260 = 1; CDROM_CONFIG_FLAGS(drive)->nec260 = 1;
} }
else if (strcmp(drive->id->model, "WEARNES CDD-120") == 0 &&
strncmp(drive->id->fw_rev, "A1.1", 4) == 0) { /* FIXME */
/* Wearnes */
CDROM_CONFIG_FLAGS(drive)->playmsf_as_bcd = 1;
CDROM_CONFIG_FLAGS(drive)->subchan_as_bcd = 1;
}
/* /*
* Sanyo 3 CD changer uses a non-standard command for CD changing * Sanyo 3 CD changer uses a non-standard command for CD changing
* (by default standard ATAPI support for CD changers is used). * (by default standard ATAPI support for CD changers is used).

View File

@ -59,10 +59,8 @@ struct ide_cd_config_flags {
__u8 no_doorlock : 1; /* Drive cannot lock the door. */ __u8 no_doorlock : 1; /* Drive cannot lock the door. */
__u8 no_eject : 1; /* Drive cannot eject the disc. */ __u8 no_eject : 1; /* Drive cannot eject the disc. */
__u8 nec260 : 1; /* Drive is a pre-1.2 NEC 260 drive. */ __u8 nec260 : 1; /* Drive is a pre-1.2 NEC 260 drive. */
__u8 playmsf_as_bcd : 1; /* PLAYMSF command takes BCD args. */
__u8 tocaddr_as_bcd : 1; /* TOC addresses are in BCD. */ __u8 tocaddr_as_bcd : 1; /* TOC addresses are in BCD. */
__u8 toctracks_as_bcd : 1; /* TOC track numbers are in BCD. */ __u8 toctracks_as_bcd : 1; /* TOC track numbers are in BCD. */
__u8 subchan_as_bcd : 1; /* Subchannel info is in BCD. */
__u8 is_changer : 1; /* Drive is a changer. */ __u8 is_changer : 1; /* Drive is a changer. */
__u8 cd_r : 1; /* Drive can write to CD-R media . */ __u8 cd_r : 1; /* Drive can write to CD-R media . */
__u8 cd_rw : 1; /* Drive can write to CD-R/W media . */ __u8 cd_rw : 1; /* Drive can write to CD-R/W media . */
@ -70,19 +68,14 @@ struct ide_cd_config_flags {
__u8 dvd_r : 1; /* Drive can write DVD-R */ __u8 dvd_r : 1; /* Drive can write DVD-R */
__u8 dvd_ram : 1; /* Drive can write DVD-RAM */ __u8 dvd_ram : 1; /* Drive can write DVD-RAM */
__u8 ram : 1; /* generic WRITE (dvd-ram/mrw) */ __u8 ram : 1; /* generic WRITE (dvd-ram/mrw) */
__u8 test_write : 1; /* Drive can fake writes */
__u8 supp_disc_present : 1; /* Changer can report exact contents
of slots. */
__u8 limit_nframes : 1; /* Drive does not provide data in __u8 limit_nframes : 1; /* Drive does not provide data in
multiples of SECTOR_SIZE when more multiples of SECTOR_SIZE when more
than one interrupt is needed. */ than one interrupt is needed. */
__u8 seeking : 1; /* Seeking in progress */ __u8 seeking : 1; /* Seeking in progress */
__u8 audio_play : 1; /* can do audio related commands */ __u8 audio_play : 1; /* can do audio related commands */
__u8 close_tray : 1; /* can close the tray */ __u8 close_tray : 1; /* can close the tray */
__u8 writing : 1; /* pseudo write in progress */
__u8 mo_drive : 1; /* drive is an MO device */ __u8 mo_drive : 1; /* drive is an MO device */
__u8 no_speed_select : 1; /* SET_CD_SPEED command is unsupported. */ __u8 no_speed_select : 1; /* SET_CD_SPEED command is unsupported. */
__u8 reserved : 1;
byte max_speed; /* Max speed of the drive */ byte max_speed; /* Max speed of the drive */
}; };
#define CDROM_CONFIG_FLAGS(drive) (&(((struct cdrom_info *)(drive->driver_data))->config_flags)) #define CDROM_CONFIG_FLAGS(drive) (&(((struct cdrom_info *)(drive->driver_data))->config_flags))