diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-17 12:09:16 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-17 12:09:16 -0400 |
commit | 0df962777b550a4b67191b3ee2555be139da4e7d (patch) | |
tree | 606e4d2452833c321784094834e1c970f8d40db3 /drivers/ide | |
parent | ea656980f40d599400d2306b23f2fbc707ae7313 (diff) |
ide-floppy: remove idefloppy_floppy_t typedef
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')
-rw-r--r-- | drivers/ide/ide-floppy.c | 18 | ||||
-rw-r--r-- | drivers/ide/ide-floppy.h | 2 | ||||
-rw-r--r-- | drivers/ide/ide-floppy_ioctl.c | 8 |
3 files changed, 13 insertions, 15 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index 58746c748c12..aeb1ad782f54 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
@@ -70,7 +70,7 @@ | |||
70 | */ | 70 | */ |
71 | static int ide_floppy_end_request(ide_drive_t *drive, int uptodate, int nsecs) | 71 | static int ide_floppy_end_request(ide_drive_t *drive, int uptodate, int nsecs) |
72 | { | 72 | { |
73 | idefloppy_floppy_t *floppy = drive->driver_data; | 73 | struct ide_disk_obj *floppy = drive->driver_data; |
74 | struct request *rq = HWGROUP(drive)->rq; | 74 | struct request *rq = HWGROUP(drive)->rq; |
75 | int error; | 75 | int error; |
76 | 76 | ||
@@ -117,7 +117,7 @@ static void idefloppy_update_buffers(ide_drive_t *drive, | |||
117 | 117 | ||
118 | static void ide_floppy_callback(ide_drive_t *drive, int dsc) | 118 | static void ide_floppy_callback(ide_drive_t *drive, int dsc) |
119 | { | 119 | { |
120 | idefloppy_floppy_t *floppy = drive->driver_data; | 120 | struct ide_disk_obj *floppy = drive->driver_data; |
121 | struct ide_atapi_pc *pc = drive->pc; | 121 | struct ide_atapi_pc *pc = drive->pc; |
122 | int uptodate = pc->error ? 0 : 1; | 122 | int uptodate = pc->error ? 0 : 1; |
123 | 123 | ||
@@ -154,7 +154,7 @@ static void ide_floppy_callback(ide_drive_t *drive, int dsc) | |||
154 | ide_floppy_end_request(drive, uptodate, 0); | 154 | ide_floppy_end_request(drive, uptodate, 0); |
155 | } | 155 | } |
156 | 156 | ||
157 | static void ide_floppy_report_error(idefloppy_floppy_t *floppy, | 157 | static void ide_floppy_report_error(struct ide_disk_obj *floppy, |
158 | struct ide_atapi_pc *pc) | 158 | struct ide_atapi_pc *pc) |
159 | { | 159 | { |
160 | /* supress error messages resulting from Medium not present */ | 160 | /* supress error messages resulting from Medium not present */ |
@@ -173,7 +173,7 @@ static void ide_floppy_report_error(idefloppy_floppy_t *floppy, | |||
173 | static ide_startstop_t idefloppy_issue_pc(ide_drive_t *drive, | 173 | static ide_startstop_t idefloppy_issue_pc(ide_drive_t *drive, |
174 | struct ide_atapi_pc *pc) | 174 | struct ide_atapi_pc *pc) |
175 | { | 175 | { |
176 | idefloppy_floppy_t *floppy = drive->driver_data; | 176 | struct ide_disk_obj *floppy = drive->driver_data; |
177 | 177 | ||
178 | if (floppy->failed_pc == NULL && | 178 | if (floppy->failed_pc == NULL && |
179 | pc->c[0] != GPCMD_REQUEST_SENSE) | 179 | pc->c[0] != GPCMD_REQUEST_SENSE) |
@@ -237,7 +237,7 @@ static void idefloppy_create_rw_cmd(ide_drive_t *drive, | |||
237 | struct ide_atapi_pc *pc, struct request *rq, | 237 | struct ide_atapi_pc *pc, struct request *rq, |
238 | unsigned long sector) | 238 | unsigned long sector) |
239 | { | 239 | { |
240 | idefloppy_floppy_t *floppy = drive->driver_data; | 240 | struct ide_disk_obj *floppy = drive->driver_data; |
241 | int block = sector / floppy->bs_factor; | 241 | int block = sector / floppy->bs_factor; |
242 | int blocks = rq->nr_sectors / floppy->bs_factor; | 242 | int blocks = rq->nr_sectors / floppy->bs_factor; |
243 | int cmd = rq_data_dir(rq); | 243 | int cmd = rq_data_dir(rq); |
@@ -261,7 +261,7 @@ static void idefloppy_create_rw_cmd(ide_drive_t *drive, | |||
261 | pc->flags |= PC_FLAG_DMA_OK; | 261 | pc->flags |= PC_FLAG_DMA_OK; |
262 | } | 262 | } |
263 | 263 | ||
264 | static void idefloppy_blockpc_cmd(idefloppy_floppy_t *floppy, | 264 | static void idefloppy_blockpc_cmd(struct ide_disk_obj *floppy, |
265 | struct ide_atapi_pc *pc, struct request *rq) | 265 | struct ide_atapi_pc *pc, struct request *rq) |
266 | { | 266 | { |
267 | ide_init_pc(pc); | 267 | ide_init_pc(pc); |
@@ -283,7 +283,7 @@ static void idefloppy_blockpc_cmd(idefloppy_floppy_t *floppy, | |||
283 | static ide_startstop_t ide_floppy_do_request(ide_drive_t *drive, | 283 | static ide_startstop_t ide_floppy_do_request(ide_drive_t *drive, |
284 | struct request *rq, sector_t block) | 284 | struct request *rq, sector_t block) |
285 | { | 285 | { |
286 | idefloppy_floppy_t *floppy = drive->driver_data; | 286 | struct ide_disk_obj *floppy = drive->driver_data; |
287 | ide_hwif_t *hwif = drive->hwif; | 287 | ide_hwif_t *hwif = drive->hwif; |
288 | struct ide_atapi_pc *pc; | 288 | struct ide_atapi_pc *pc; |
289 | 289 | ||
@@ -344,7 +344,7 @@ static ide_startstop_t ide_floppy_do_request(ide_drive_t *drive, | |||
344 | */ | 344 | */ |
345 | static int ide_floppy_get_flexible_disk_page(ide_drive_t *drive) | 345 | static int ide_floppy_get_flexible_disk_page(ide_drive_t *drive) |
346 | { | 346 | { |
347 | idefloppy_floppy_t *floppy = drive->driver_data; | 347 | struct ide_disk_obj *floppy = drive->driver_data; |
348 | struct gendisk *disk = floppy->disk; | 348 | struct gendisk *disk = floppy->disk; |
349 | struct ide_atapi_pc pc; | 349 | struct ide_atapi_pc pc; |
350 | u8 *page; | 350 | u8 *page; |
@@ -407,7 +407,7 @@ static int ide_floppy_get_flexible_disk_page(ide_drive_t *drive) | |||
407 | */ | 407 | */ |
408 | static int ide_floppy_get_capacity(ide_drive_t *drive) | 408 | static int ide_floppy_get_capacity(ide_drive_t *drive) |
409 | { | 409 | { |
410 | idefloppy_floppy_t *floppy = drive->driver_data; | 410 | struct ide_disk_obj *floppy = drive->driver_data; |
411 | struct gendisk *disk = floppy->disk; | 411 | struct gendisk *disk = floppy->disk; |
412 | struct ide_atapi_pc pc; | 412 | struct ide_atapi_pc pc; |
413 | u8 *cap_desc; | 413 | u8 *cap_desc; |
diff --git a/drivers/ide/ide-floppy.h b/drivers/ide/ide-floppy.h index acebc8c5a827..c17124dd6079 100644 --- a/drivers/ide/ide-floppy.h +++ b/drivers/ide/ide-floppy.h | |||
@@ -4,8 +4,6 @@ | |||
4 | #include "ide-gd.h" | 4 | #include "ide-gd.h" |
5 | 5 | ||
6 | #ifdef CONFIG_IDE_GD_ATAPI | 6 | #ifdef CONFIG_IDE_GD_ATAPI |
7 | typedef struct ide_disk_obj idefloppy_floppy_t; | ||
8 | |||
9 | /* | 7 | /* |
10 | * Pages of the SELECT SENSE / MODE SENSE packet commands. | 8 | * Pages of the SELECT SENSE / MODE SENSE packet commands. |
11 | * See SFF-8070i spec. | 9 | * See SFF-8070i spec. |
diff --git a/drivers/ide/ide-floppy_ioctl.c b/drivers/ide/ide-floppy_ioctl.c index e8aa0a5bf5dc..409e4c15f9b7 100644 --- a/drivers/ide/ide-floppy_ioctl.c +++ b/drivers/ide/ide-floppy_ioctl.c | |||
@@ -113,7 +113,7 @@ static void ide_floppy_create_format_unit_cmd(struct ide_atapi_pc *pc, int b, | |||
113 | 113 | ||
114 | static int ide_floppy_get_sfrp_bit(ide_drive_t *drive) | 114 | static int ide_floppy_get_sfrp_bit(ide_drive_t *drive) |
115 | { | 115 | { |
116 | idefloppy_floppy_t *floppy = drive->driver_data; | 116 | struct ide_disk_obj *floppy = drive->driver_data; |
117 | struct ide_atapi_pc pc; | 117 | struct ide_atapi_pc pc; |
118 | 118 | ||
119 | drive->atapi_flags &= ~IDE_AFLAG_SRFP; | 119 | drive->atapi_flags &= ~IDE_AFLAG_SRFP; |
@@ -132,7 +132,7 @@ static int ide_floppy_get_sfrp_bit(ide_drive_t *drive) | |||
132 | 132 | ||
133 | static int ide_floppy_format_unit(ide_drive_t *drive, int __user *arg) | 133 | static int ide_floppy_format_unit(ide_drive_t *drive, int __user *arg) |
134 | { | 134 | { |
135 | idefloppy_floppy_t *floppy = drive->driver_data; | 135 | struct ide_disk_obj *floppy = drive->driver_data; |
136 | struct ide_atapi_pc pc; | 136 | struct ide_atapi_pc pc; |
137 | int blocks, length, flags, err = 0; | 137 | int blocks, length, flags, err = 0; |
138 | 138 | ||
@@ -190,7 +190,7 @@ out: | |||
190 | 190 | ||
191 | static int ide_floppy_get_format_progress(ide_drive_t *drive, int __user *arg) | 191 | static int ide_floppy_get_format_progress(ide_drive_t *drive, int __user *arg) |
192 | { | 192 | { |
193 | idefloppy_floppy_t *floppy = drive->driver_data; | 193 | struct ide_disk_obj *floppy = drive->driver_data; |
194 | struct ide_atapi_pc pc; | 194 | struct ide_atapi_pc pc; |
195 | int progress_indication = 0x10000; | 195 | int progress_indication = 0x10000; |
196 | 196 | ||
@@ -226,7 +226,7 @@ static int ide_floppy_get_format_progress(ide_drive_t *drive, int __user *arg) | |||
226 | static int ide_floppy_lockdoor(ide_drive_t *drive, struct ide_atapi_pc *pc, | 226 | static int ide_floppy_lockdoor(ide_drive_t *drive, struct ide_atapi_pc *pc, |
227 | unsigned long arg, unsigned int cmd) | 227 | unsigned long arg, unsigned int cmd) |
228 | { | 228 | { |
229 | idefloppy_floppy_t *floppy = drive->driver_data; | 229 | struct ide_disk_obj *floppy = drive->driver_data; |
230 | struct gendisk *disk = floppy->disk; | 230 | struct gendisk *disk = floppy->disk; |
231 | int prevent = (arg && cmd != CDROMEJECT) ? 1 : 0; | 231 | int prevent = (arg && cmd != CDROMEJECT) ? 1 : 0; |
232 | 232 | ||