diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-02-01 17:09:19 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-02-01 17:09:19 -0500 |
commit | 2609d06d36317cc22f6d3c37186a8cf1a5f87ba6 (patch) | |
tree | 542f2bda9c1bf2aa705aad1991975208bcdb117d | |
parent | b8d25dee3b73b572ea1778671098ee7b943133c5 (diff) |
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>
-rw-r--r-- | drivers/ide/ide-cd.c | 18 | ||||
-rw-r--r-- | drivers/ide/ide-cd.h | 7 |
2 files changed, 2 insertions, 23 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index cd3ea32041bb..c736f769bff3 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -2693,8 +2693,6 @@ int ide_cdrom_probe_capabilities (ide_drive_t *drive) | |||
2693 | CDROM_CONFIG_FLAGS(drive)->cd_rw = 1; | 2693 | CDROM_CONFIG_FLAGS(drive)->cd_rw = 1; |
2694 | CDROM_CONFIG_FLAGS(drive)->ram = 1; | 2694 | CDROM_CONFIG_FLAGS(drive)->ram = 1; |
2695 | } | 2695 | } |
2696 | if (cap.test_write) | ||
2697 | CDROM_CONFIG_FLAGS(drive)->test_write = 1; | ||
2698 | if (cap.dvd_ram_read || cap.dvd_r_read || cap.dvd_rom) | 2696 | if (cap.dvd_ram_read || cap.dvd_r_read || cap.dvd_rom) |
2699 | CDROM_CONFIG_FLAGS(drive)->dvd = 1; | 2697 | CDROM_CONFIG_FLAGS(drive)->dvd = 1; |
2700 | if (cap.dvd_ram_write) { | 2698 | if (cap.dvd_ram_write) { |
@@ -2727,10 +2725,9 @@ int ide_cdrom_probe_capabilities (ide_drive_t *drive) | |||
2727 | #endif /* not STANDARD_ATAPI */ | 2725 | #endif /* not STANDARD_ATAPI */ |
2728 | if (cap.mechtype == mechtype_individual_changer || | 2726 | if (cap.mechtype == mechtype_individual_changer || |
2729 | cap.mechtype == mechtype_cartridge_changer) { | 2727 | cap.mechtype == mechtype_cartridge_changer) { |
2730 | if ((nslots = cdrom_number_of_slots(cdi)) > 1) { | 2728 | nslots = cdrom_number_of_slots(cdi); |
2729 | if (nslots > 1) | ||
2731 | CDROM_CONFIG_FLAGS(drive)->is_changer = 1; | 2730 | CDROM_CONFIG_FLAGS(drive)->is_changer = 1; |
2732 | CDROM_CONFIG_FLAGS(drive)->supp_disc_present = 1; | ||
2733 | } | ||
2734 | } | 2731 | } |
2735 | 2732 | ||
2736 | ide_cdrom_update_speed(drive, &cap); | 2733 | ide_cdrom_update_speed(drive, &cap); |
@@ -2892,10 +2889,7 @@ int ide_cdrom_setup (ide_drive_t *drive) | |||
2892 | Some versions of this drive like to talk BCD. */ | 2889 | Some versions of this drive like to talk BCD. */ |
2893 | CDROM_CONFIG_FLAGS(drive)->toctracks_as_bcd = 1; | 2890 | CDROM_CONFIG_FLAGS(drive)->toctracks_as_bcd = 1; |
2894 | CDROM_CONFIG_FLAGS(drive)->tocaddr_as_bcd = 1; | 2891 | CDROM_CONFIG_FLAGS(drive)->tocaddr_as_bcd = 1; |
2895 | CDROM_CONFIG_FLAGS(drive)->playmsf_as_bcd = 1; | ||
2896 | CDROM_CONFIG_FLAGS(drive)->subchan_as_bcd = 1; | ||
2897 | } | 2892 | } |
2898 | |||
2899 | else if (strcmp (drive->id->model, "V006E0DS") == 0 && | 2893 | else if (strcmp (drive->id->model, "V006E0DS") == 0 && |
2900 | drive->id->fw_rev[4] == '1' && | 2894 | drive->id->fw_rev[4] == '1' && |
2901 | drive->id->fw_rev[6] <= '2') { | 2895 | drive->id->fw_rev[6] <= '2') { |
@@ -2908,16 +2902,8 @@ int ide_cdrom_setup (ide_drive_t *drive) | |||
2908 | This drive was released before the 1.2 version | 2902 | This drive was released before the 1.2 version |
2909 | of the spec. */ | 2903 | of the spec. */ |
2910 | CDROM_CONFIG_FLAGS(drive)->tocaddr_as_bcd = 1; | 2904 | CDROM_CONFIG_FLAGS(drive)->tocaddr_as_bcd = 1; |
2911 | CDROM_CONFIG_FLAGS(drive)->playmsf_as_bcd = 1; | ||
2912 | CDROM_CONFIG_FLAGS(drive)->subchan_as_bcd = 1; | ||
2913 | CDROM_CONFIG_FLAGS(drive)->nec260 = 1; | 2905 | CDROM_CONFIG_FLAGS(drive)->nec260 = 1; |
2914 | } | 2906 | } |
2915 | else if (strcmp(drive->id->model, "WEARNES CDD-120") == 0 && | ||
2916 | strncmp(drive->id->fw_rev, "A1.1", 4) == 0) { /* FIXME */ | ||
2917 | /* Wearnes */ | ||
2918 | CDROM_CONFIG_FLAGS(drive)->playmsf_as_bcd = 1; | ||
2919 | CDROM_CONFIG_FLAGS(drive)->subchan_as_bcd = 1; | ||
2920 | } | ||
2921 | /* | 2907 | /* |
2922 | * Sanyo 3 CD changer uses a non-standard command for CD changing | 2908 | * Sanyo 3 CD changer uses a non-standard command for CD changing |
2923 | * (by default standard ATAPI support for CD changers is used). | 2909 | * (by default standard ATAPI support for CD changers is used). |
diff --git a/drivers/ide/ide-cd.h b/drivers/ide/ide-cd.h index e6f219772549..d224b062db52 100644 --- a/drivers/ide/ide-cd.h +++ b/drivers/ide/ide-cd.h | |||
@@ -59,10 +59,8 @@ struct ide_cd_config_flags { | |||
59 | __u8 no_doorlock : 1; /* Drive cannot lock the door. */ | 59 | __u8 no_doorlock : 1; /* Drive cannot lock the door. */ |
60 | __u8 no_eject : 1; /* Drive cannot eject the disc. */ | 60 | __u8 no_eject : 1; /* Drive cannot eject the disc. */ |
61 | __u8 nec260 : 1; /* Drive is a pre-1.2 NEC 260 drive. */ | 61 | __u8 nec260 : 1; /* Drive is a pre-1.2 NEC 260 drive. */ |
62 | __u8 playmsf_as_bcd : 1; /* PLAYMSF command takes BCD args. */ | ||
63 | __u8 tocaddr_as_bcd : 1; /* TOC addresses are in BCD. */ | 62 | __u8 tocaddr_as_bcd : 1; /* TOC addresses are in BCD. */ |
64 | __u8 toctracks_as_bcd : 1; /* TOC track numbers are in BCD. */ | 63 | __u8 toctracks_as_bcd : 1; /* TOC track numbers are in BCD. */ |
65 | __u8 subchan_as_bcd : 1; /* Subchannel info is in BCD. */ | ||
66 | __u8 is_changer : 1; /* Drive is a changer. */ | 64 | __u8 is_changer : 1; /* Drive is a changer. */ |
67 | __u8 cd_r : 1; /* Drive can write to CD-R media . */ | 65 | __u8 cd_r : 1; /* Drive can write to CD-R media . */ |
68 | __u8 cd_rw : 1; /* Drive can write to CD-R/W media . */ | 66 | __u8 cd_rw : 1; /* Drive can write to CD-R/W media . */ |
@@ -70,19 +68,14 @@ struct ide_cd_config_flags { | |||
70 | __u8 dvd_r : 1; /* Drive can write DVD-R */ | 68 | __u8 dvd_r : 1; /* Drive can write DVD-R */ |
71 | __u8 dvd_ram : 1; /* Drive can write DVD-RAM */ | 69 | __u8 dvd_ram : 1; /* Drive can write DVD-RAM */ |
72 | __u8 ram : 1; /* generic WRITE (dvd-ram/mrw) */ | 70 | __u8 ram : 1; /* generic WRITE (dvd-ram/mrw) */ |
73 | __u8 test_write : 1; /* Drive can fake writes */ | ||
74 | __u8 supp_disc_present : 1; /* Changer can report exact contents | ||
75 | of slots. */ | ||
76 | __u8 limit_nframes : 1; /* Drive does not provide data in | 71 | __u8 limit_nframes : 1; /* Drive does not provide data in |
77 | multiples of SECTOR_SIZE when more | 72 | multiples of SECTOR_SIZE when more |
78 | than one interrupt is needed. */ | 73 | than one interrupt is needed. */ |
79 | __u8 seeking : 1; /* Seeking in progress */ | 74 | __u8 seeking : 1; /* Seeking in progress */ |
80 | __u8 audio_play : 1; /* can do audio related commands */ | 75 | __u8 audio_play : 1; /* can do audio related commands */ |
81 | __u8 close_tray : 1; /* can close the tray */ | 76 | __u8 close_tray : 1; /* can close the tray */ |
82 | __u8 writing : 1; /* pseudo write in progress */ | ||
83 | __u8 mo_drive : 1; /* drive is an MO device */ | 77 | __u8 mo_drive : 1; /* drive is an MO device */ |
84 | __u8 no_speed_select : 1; /* SET_CD_SPEED command is unsupported. */ | 78 | __u8 no_speed_select : 1; /* SET_CD_SPEED command is unsupported. */ |
85 | __u8 reserved : 1; | ||
86 | byte max_speed; /* Max speed of the drive */ | 79 | byte max_speed; /* Max speed of the drive */ |
87 | }; | 80 | }; |
88 | #define CDROM_CONFIG_FLAGS(drive) (&(((struct cdrom_info *)(drive->driver_data))->config_flags)) | 81 | #define CDROM_CONFIG_FLAGS(drive) (&(((struct cdrom_info *)(drive->driver_data))->config_flags)) |