aboutsummaryrefslogtreecommitdiffstats
path: root/include/pcmcia/ds.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/pcmcia/ds.h')
-rw-r--r--include/pcmcia/ds.h32
1 files changed, 15 insertions, 17 deletions
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h
index 312fd958c901..b707a603351b 100644
--- a/include/pcmcia/ds.h
+++ b/include/pcmcia/ds.h
@@ -16,8 +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>
25#include <pcmcia/device_id.h>
21 26
22typedef struct tuple_parse_t { 27typedef struct tuple_parse_t {
23 tuple_t tuple; 28 tuple_t tuple;
@@ -47,7 +52,6 @@ typedef struct mtd_info_t {
47} mtd_info_t; 52} mtd_info_t;
48 53
49typedef union ds_ioctl_arg_t { 54typedef union ds_ioctl_arg_t {
50 servinfo_t servinfo;
51 adjust_t adjust; 55 adjust_t adjust;
52 config_info_t config; 56 config_info_t config;
53 tuple_t tuple; 57 tuple_t tuple;
@@ -63,7 +67,6 @@ typedef union ds_ioctl_arg_t {
63 cisdump_t cisdump; 67 cisdump_t cisdump;
64} ds_ioctl_arg_t; 68} ds_ioctl_arg_t;
65 69
66#define DS_GET_CARD_SERVICES_INFO _IOR ('d', 1, servinfo_t)
67#define DS_ADJUST_RESOURCE_INFO _IOWR('d', 2, adjust_t) 70#define DS_ADJUST_RESOURCE_INFO _IOWR('d', 2, adjust_t)
68#define DS_GET_CONFIGURATION_INFO _IOWR('d', 3, config_info_t) 71#define DS_GET_CONFIGURATION_INFO _IOWR('d', 3, config_info_t)
69#define DS_GET_FIRST_TUPLE _IOWR('d', 4, tuple_t) 72#define DS_GET_FIRST_TUPLE _IOWR('d', 4, tuple_t)
@@ -129,12 +132,13 @@ typedef struct dev_link_t {
129 132
130struct pcmcia_socket; 133struct pcmcia_socket;
131 134
132extern struct bus_type pcmcia_bus_type;
133
134struct pcmcia_driver { 135struct 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;
141 struct pcmcia_device_id *id_table;
138 struct device_driver drv; 142 struct device_driver drv;
139}; 143};
140 144
@@ -158,22 +162,16 @@ struct pcmcia_device {
158 /* deprecated, a cleaned up version will be moved into this 162 /* deprecated, a cleaned up version will be moved into this
159 struct soon */ 163 struct soon */
160 dev_link_t *instance; 164 dev_link_t *instance;
161 struct client_t { 165 event_callback_args_t event_callback_args;
162 u_short client_magic; 166 u_int state;
163 struct pcmcia_socket *Socket;
164 u_char Function;
165 u_int state;
166 event_t EventMask;
167 int (*event_handler) (event_t event, int priority,
168 event_callback_args_t *);
169 event_callback_args_t event_callback_args;
170 } client;
171 167
172 /* information about this device */ 168 /* information about this device */
173 u8 has_manf_id:1; 169 u8 has_manf_id:1;
174 u8 has_card_id:1; 170 u8 has_card_id:1;
175 u8 has_func_id:1; 171 u8 has_func_id:1;
176 u8 reserved:5; 172
173 u8 allow_func_id_match:1;
174 u8 reserved:4;
177 175
178 u8 func_id; 176 u8 func_id;
179 u16 manf_id; 177 u16 manf_id;
@@ -190,8 +188,8 @@ struct pcmcia_device {
190#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)
191#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)
192 190
193#define handle_to_pdev(handle) container_of(handle, struct pcmcia_device, client); 191#define handle_to_pdev(handle) (handle)
194#define handle_to_dev(handle) ((container_of(handle, struct pcmcia_device, client))->dev) 192#define handle_to_dev(handle) (handle->dev)
195 193
196/* error reporting */ 194/* error reporting */
197void cs_error(client_handle_t handle, int func, int ret); 195void cs_error(client_handle_t handle, int func, int ret);