aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-25 16:17:06 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-25 16:17:06 -0500
commitcd2a2d969761c26542095c01324201ca0b3ee896 (patch)
treefa95d329ac2f2ae3fca30833b8b0ec91aefbd243 /drivers
parent1c029fd658baa2442e8e51dc9c819301cad95777 (diff)
ide: remove task_ioreg_t typedef (take 2)
Remove task_ioreg_t typedef from the kernel code (but leave it in <linux/hdreg.h> for #ifndef/#endif __KERNEL__ case). While at it also move sata_ioreg_t typedef under #ifndef/#endif __KERNEL__. v2: Remove name of the second parameter from ide_execute_command() declaration. (Noticed by Sergei). Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/ide-disk.c20
-rw-r--r--drivers/ide/ide-iops.c5
-rw-r--r--drivers/ide/ide-taskfile.c4
3 files changed, 15 insertions, 14 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index b1781908e1f2..322c4691836a 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -138,7 +138,7 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq,
138 ide_hwif_t *hwif = HWIF(drive); 138 ide_hwif_t *hwif = HWIF(drive);
139 unsigned int dma = drive->using_dma; 139 unsigned int dma = drive->using_dma;
140 u8 lba48 = (drive->addressing == 1) ? 1 : 0; 140 u8 lba48 = (drive->addressing == 1) ? 1 : 0;
141 task_ioreg_t command = WIN_NOP; 141 u8 command = WIN_NOP;
142 ata_nsector_t nsectors; 142 ata_nsector_t nsectors;
143 143
144 nsectors.all = (u16) rq->nr_sectors; 144 nsectors.all = (u16) rq->nr_sectors;
@@ -162,7 +162,7 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq,
162 162
163 if (drive->select.b.lba) { 163 if (drive->select.b.lba) {
164 if (lba48) { 164 if (lba48) {
165 task_ioreg_t tasklets[10]; 165 u8 tasklets[10];
166 166
167 pr_debug("%s: LBA=0x%012llx\n", drive->name, 167 pr_debug("%s: LBA=0x%012llx\n", drive->name,
168 (unsigned long long)block); 168 (unsigned long long)block);
@@ -171,16 +171,16 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq,
171 tasklets[1] = 0; 171 tasklets[1] = 0;
172 tasklets[2] = nsectors.b.low; 172 tasklets[2] = nsectors.b.low;
173 tasklets[3] = nsectors.b.high; 173 tasklets[3] = nsectors.b.high;
174 tasklets[4] = (task_ioreg_t) block; 174 tasklets[4] = (u8) block;
175 tasklets[5] = (task_ioreg_t) (block>>8); 175 tasklets[5] = (u8)(block >> 8);
176 tasklets[6] = (task_ioreg_t) (block>>16); 176 tasklets[6] = (u8)(block >> 16);
177 tasklets[7] = (task_ioreg_t) (block>>24); 177 tasklets[7] = (u8)(block >> 24);
178 if (sizeof(block) == 4) { 178 if (sizeof(block) == 4) {
179 tasklets[8] = (task_ioreg_t) 0; 179 tasklets[8] = 0;
180 tasklets[9] = (task_ioreg_t) 0; 180 tasklets[9] = 0;
181 } else { 181 } else {
182 tasklets[8] = (task_ioreg_t)((u64)block >> 32); 182 tasklets[8] = (u8)((u64)block >> 32);
183 tasklets[9] = (task_ioreg_t)((u64)block >> 40); 183 tasklets[9] = (u8)((u64)block >> 40);
184 } 184 }
185#ifdef DEBUG 185#ifdef DEBUG
186 printk("%s: 0x%02x%02x 0x%02x%02x%02x%02x%02x%02x\n", 186 printk("%s: 0x%02x%02x 0x%02x%02x%02x%02x%02x%02x\n",
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index bb9693dabe41..f4e8a0cf06e2 100644
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -902,8 +902,9 @@ EXPORT_SYMBOL(ide_set_handler);
902 * handler and IRQ setup do not race. All IDE command kick off 902 * handler and IRQ setup do not race. All IDE command kick off
903 * should go via this function or do equivalent locking. 903 * should go via this function or do equivalent locking.
904 */ 904 */
905 905
906void ide_execute_command(ide_drive_t *drive, task_ioreg_t cmd, ide_handler_t *handler, unsigned timeout, ide_expiry_t *expiry) 906void ide_execute_command(ide_drive_t *drive, u8 cmd, ide_handler_t *handler,
907 unsigned timeout, ide_expiry_t *expiry)
907{ 908{
908 unsigned long flags; 909 unsigned long flags;
909 ide_hwgroup_t *hwgroup = HWGROUP(drive); 910 ide_hwgroup_t *hwgroup = HWGROUP(drive);
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index 2b60f1b0437e..91948a46cc6e 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -519,8 +519,8 @@ int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
519 ide_task_t args; 519 ide_task_t args;
520 u8 *outbuf = NULL; 520 u8 *outbuf = NULL;
521 u8 *inbuf = NULL; 521 u8 *inbuf = NULL;
522 task_ioreg_t *argsptr = args.tfRegister; 522 u8 *argsptr = args.tfRegister;
523 task_ioreg_t *hobsptr = args.hobRegister; 523 u8 *hobsptr = args.hobRegister;
524 int err = 0; 524 int err = 0;
525 int tasksize = sizeof(struct ide_task_request_s); 525 int tasksize = sizeof(struct ide_task_request_s);
526 unsigned int taskin = 0; 526 unsigned int taskin = 0;