diff options
Diffstat (limited to 'include/pcmcia/ds.h')
-rw-r--r-- | include/pcmcia/ds.h | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h index 2b52553f2d94..b707a603351b 100644 --- a/include/pcmcia/ds.h +++ b/include/pcmcia/ds.h | |||
@@ -16,10 +16,13 @@ | |||
16 | #ifndef _LINUX_DS_H | 16 | #ifndef _LINUX_DS_H |
17 | #define _LINUX_DS_H | 17 | #define _LINUX_DS_H |
18 | 18 | ||
19 | #ifdef __KERNEL__ | ||
20 | #include <linux/mod_devicetable.h> | ||
21 | #endif | ||
22 | |||
19 | #include <pcmcia/bulkmem.h> | 23 | #include <pcmcia/bulkmem.h> |
20 | #include <pcmcia/cs_types.h> | 24 | #include <pcmcia/cs_types.h> |
21 | #include <pcmcia/device_id.h> | 25 | #include <pcmcia/device_id.h> |
22 | #include <linux/mod_devicetable.h> | ||
23 | 26 | ||
24 | typedef struct tuple_parse_t { | 27 | typedef struct tuple_parse_t { |
25 | tuple_t tuple; | 28 | tuple_t tuple; |
@@ -49,7 +52,6 @@ typedef struct mtd_info_t { | |||
49 | } mtd_info_t; | 52 | } mtd_info_t; |
50 | 53 | ||
51 | typedef union ds_ioctl_arg_t { | 54 | typedef union ds_ioctl_arg_t { |
52 | servinfo_t servinfo; | ||
53 | adjust_t adjust; | 55 | adjust_t adjust; |
54 | config_info_t config; | 56 | config_info_t config; |
55 | tuple_t tuple; | 57 | tuple_t tuple; |
@@ -65,7 +67,6 @@ typedef union ds_ioctl_arg_t { | |||
65 | cisdump_t cisdump; | 67 | cisdump_t cisdump; |
66 | } ds_ioctl_arg_t; | 68 | } ds_ioctl_arg_t; |
67 | 69 | ||
68 | #define DS_GET_CARD_SERVICES_INFO _IOR ('d', 1, servinfo_t) | ||
69 | #define DS_ADJUST_RESOURCE_INFO _IOWR('d', 2, adjust_t) | 70 | #define DS_ADJUST_RESOURCE_INFO _IOWR('d', 2, adjust_t) |
70 | #define DS_GET_CONFIGURATION_INFO _IOWR('d', 3, config_info_t) | 71 | #define DS_GET_CONFIGURATION_INFO _IOWR('d', 3, config_info_t) |
71 | #define DS_GET_FIRST_TUPLE _IOWR('d', 4, tuple_t) | 72 | #define DS_GET_FIRST_TUPLE _IOWR('d', 4, tuple_t) |
@@ -133,6 +134,8 @@ struct pcmcia_socket; | |||
133 | 134 | ||
134 | struct pcmcia_driver { | 135 | struct pcmcia_driver { |
135 | dev_link_t *(*attach)(void); | 136 | dev_link_t *(*attach)(void); |
137 | int (*event) (event_t event, int priority, | ||
138 | event_callback_args_t *); | ||
136 | void (*detach)(dev_link_t *); | 139 | void (*detach)(dev_link_t *); |
137 | struct module *owner; | 140 | struct module *owner; |
138 | struct pcmcia_device_id *id_table; | 141 | struct pcmcia_device_id *id_table; |
@@ -159,16 +162,8 @@ struct pcmcia_device { | |||
159 | /* deprecated, a cleaned up version will be moved into this | 162 | /* deprecated, a cleaned up version will be moved into this |
160 | struct soon */ | 163 | struct soon */ |
161 | dev_link_t *instance; | 164 | dev_link_t *instance; |
162 | struct client_t { | 165 | event_callback_args_t event_callback_args; |
163 | u_short client_magic; | 166 | u_int state; |
164 | struct pcmcia_socket *Socket; | ||
165 | u_char Function; | ||
166 | u_int state; | ||
167 | event_t EventMask; | ||
168 | int (*event_handler) (event_t event, int priority, | ||
169 | event_callback_args_t *); | ||
170 | event_callback_args_t event_callback_args; | ||
171 | } client; | ||
172 | 167 | ||
173 | /* information about this device */ | 168 | /* information about this device */ |
174 | u8 has_manf_id:1; | 169 | u8 has_manf_id:1; |
@@ -193,8 +188,8 @@ struct pcmcia_device { | |||
193 | #define to_pcmcia_dev(n) container_of(n, struct pcmcia_device, dev) | 188 | #define to_pcmcia_dev(n) container_of(n, struct pcmcia_device, dev) |
194 | #define to_pcmcia_drv(n) container_of(n, struct pcmcia_driver, drv) | 189 | #define to_pcmcia_drv(n) container_of(n, struct pcmcia_driver, drv) |
195 | 190 | ||
196 | #define handle_to_pdev(handle) container_of(handle, struct pcmcia_device, client); | 191 | #define handle_to_pdev(handle) (handle) |
197 | #define handle_to_dev(handle) ((container_of(handle, struct pcmcia_device, client))->dev) | 192 | #define handle_to_dev(handle) (handle->dev) |
198 | 193 | ||
199 | /* error reporting */ | 194 | /* error reporting */ |
200 | void cs_error(client_handle_t handle, int func, int ret); | 195 | void cs_error(client_handle_t handle, int func, int ret); |