aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
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 /include/linux
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 'include/linux')
-rw-r--r--include/linux/hdreg.h46
-rw-r--r--include/linux/ide.h7
2 files changed, 27 insertions, 26 deletions
diff --git a/include/linux/hdreg.h b/include/linux/hdreg.h
index 818c6afc1091..3bcb88560418 100644
--- a/include/linux/hdreg.h
+++ b/include/linux/hdreg.h
@@ -87,10 +87,10 @@
87#ifndef __KERNEL__ 87#ifndef __KERNEL__
88#define IDE_TASKFILE_STD_OUT_FLAGS 0xFE 88#define IDE_TASKFILE_STD_OUT_FLAGS 0xFE
89#define IDE_HOB_STD_OUT_FLAGS 0x3C 89#define IDE_HOB_STD_OUT_FLAGS 0x3C
90#endif
91 90
92typedef unsigned char task_ioreg_t; 91typedef unsigned char task_ioreg_t;
93typedef unsigned long sata_ioreg_t; 92typedef unsigned long sata_ioreg_t;
93#endif
94 94
95typedef union ide_reg_valid_s { 95typedef union ide_reg_valid_s {
96 unsigned all : 16; 96 unsigned all : 16;
@@ -116,8 +116,8 @@ typedef union ide_reg_valid_s {
116} ide_reg_valid_t; 116} ide_reg_valid_t;
117 117
118typedef struct ide_task_request_s { 118typedef struct ide_task_request_s {
119 task_ioreg_t io_ports[8]; 119 __u8 io_ports[8];
120 task_ioreg_t hob_ports[8]; 120 __u8 hob_ports[8];
121 ide_reg_valid_t out_flags; 121 ide_reg_valid_t out_flags;
122 ide_reg_valid_t in_flags; 122 ide_reg_valid_t in_flags;
123 int data_phase; 123 int data_phase;
@@ -133,32 +133,32 @@ typedef struct ide_ioctl_request_s {
133} ide_ioctl_request_t; 133} ide_ioctl_request_t;
134 134
135struct hd_drive_cmd_hdr { 135struct hd_drive_cmd_hdr {
136 task_ioreg_t command; 136 __u8 command;
137 task_ioreg_t sector_number; 137 __u8 sector_number;
138 task_ioreg_t feature; 138 __u8 feature;
139 task_ioreg_t sector_count; 139 __u8 sector_count;
140}; 140};
141 141
142typedef struct hd_drive_task_hdr { 142typedef struct hd_drive_task_hdr {
143 task_ioreg_t data; 143 __u8 data;
144 task_ioreg_t feature; 144 __u8 feature;
145 task_ioreg_t sector_count; 145 __u8 sector_count;
146 task_ioreg_t sector_number; 146 __u8 sector_number;
147 task_ioreg_t low_cylinder; 147 __u8 low_cylinder;
148 task_ioreg_t high_cylinder; 148 __u8 high_cylinder;
149 task_ioreg_t device_head; 149 __u8 device_head;
150 task_ioreg_t command; 150 __u8 command;
151} task_struct_t; 151} task_struct_t;
152 152
153typedef struct hd_drive_hob_hdr { 153typedef struct hd_drive_hob_hdr {
154 task_ioreg_t data; 154 __u8 data;
155 task_ioreg_t feature; 155 __u8 feature;
156 task_ioreg_t sector_count; 156 __u8 sector_count;
157 task_ioreg_t sector_number; 157 __u8 sector_number;
158 task_ioreg_t low_cylinder; 158 __u8 low_cylinder;
159 task_ioreg_t high_cylinder; 159 __u8 high_cylinder;
160 task_ioreg_t device_head; 160 __u8 device_head;
161 task_ioreg_t control; 161 __u8 control;
162} hob_struct_t; 162} hob_struct_t;
163 163
164#define TASKFILE_INVALID 0x7fff 164#define TASKFILE_INVALID 0x7fff
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 1fb03b630676..66a38f101175 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1019,7 +1019,8 @@ int ide_end_dequeued_request(ide_drive_t *drive, struct request *rq,
1019 1019
1020extern void ide_set_handler (ide_drive_t *drive, ide_handler_t *handler, unsigned int timeout, ide_expiry_t *expiry); 1020extern void ide_set_handler (ide_drive_t *drive, ide_handler_t *handler, unsigned int timeout, ide_expiry_t *expiry);
1021 1021
1022extern void ide_execute_command(ide_drive_t *, task_ioreg_t cmd, ide_handler_t *, unsigned int, ide_expiry_t *); 1022void ide_execute_command(ide_drive_t *, u8, ide_handler_t *, unsigned int,
1023 ide_expiry_t *);
1023 1024
1024ide_startstop_t __ide_error(ide_drive_t *, struct request *, u8, u8); 1025ide_startstop_t __ide_error(ide_drive_t *, struct request *, u8, u8);
1025 1026
@@ -1068,8 +1069,8 @@ typedef struct ide_task_s {
1068 * struct hd_drive_hob_hdr hobf; 1069 * struct hd_drive_hob_hdr hobf;
1069 * hob_struct_t hobf; 1070 * hob_struct_t hobf;
1070 */ 1071 */
1071 task_ioreg_t tfRegister[8]; 1072 u8 tfRegister[8];
1072 task_ioreg_t hobRegister[8]; 1073 u8 hobRegister[8];
1073 ide_reg_valid_t tf_out_flags; 1074 ide_reg_valid_t tf_out_flags;
1074 ide_reg_valid_t tf_in_flags; 1075 ide_reg_valid_t tf_in_flags;
1075 int data_phase; 1076 int data_phase;