aboutsummaryrefslogtreecommitdiffstats
path: root/include/pcmcia
diff options
context:
space:
mode:
Diffstat (limited to 'include/pcmcia')
-rw-r--r--include/pcmcia/ds.h31
1 files changed, 14 insertions, 17 deletions
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h
index 7f712df3e297..61f7d2dec199 100644
--- a/include/pcmcia/ds.h
+++ b/include/pcmcia/ds.h
@@ -39,7 +39,7 @@ typedef struct win_info_t {
39typedef struct bind_info_t { 39typedef struct bind_info_t {
40 dev_info_t dev_info; 40 dev_info_t dev_info;
41 u_char function; 41 u_char function;
42 struct dev_link_t *instance; 42 struct pcmcia_device *instance;
43 char name[DEV_NAME_LEN]; 43 char name[DEV_NAME_LEN];
44 u_short major, minor; 44 u_short major, minor;
45 void *next; 45 void *next;
@@ -103,18 +103,6 @@ typedef struct dev_node_t {
103 struct dev_node_t *next; 103 struct dev_node_t *next;
104} dev_node_t; 104} dev_node_t;
105 105
106typedef struct dev_link_t {
107 dev_node_t *dev;
108 u_int state, open;
109 client_handle_t handle;
110 io_req_t io;
111 irq_req_t irq;
112 config_req_t conf;
113 window_handle_t win;
114 void *priv;
115 struct dev_link_t *next;
116} dev_link_t;
117
118/* Flags for device state */ 106/* Flags for device state */
119#define DEV_PRESENT 0x01 107#define DEV_PRESENT 0x01
120#define DEV_CONFIG 0x02 108#define DEV_CONFIG 0x02
@@ -163,9 +151,17 @@ struct pcmcia_device {
163 151
164 struct list_head socket_device_list; 152 struct list_head socket_device_list;
165 153
166 /* deprecated, a cleaned up version will be moved into this 154 /* deprecated, will be cleaned up soon */
167 struct soon */ 155 dev_node_t *dev_node;
168 dev_link_t *instance; 156 u_int state;
157 u_int open;
158 struct pcmcia_device *handle;
159 io_req_t io;
160 irq_req_t irq;
161 config_req_t conf;
162 window_handle_t win;
163 void *priv;
164
169 u_int p_state; 165 u_int p_state;
170 166
171 /* information about this device */ 167 /* information about this device */
@@ -189,6 +185,7 @@ struct pcmcia_device {
189 struct pcmcia_driver * cardmgr; 185 struct pcmcia_driver * cardmgr;
190#endif 186#endif
191}; 187};
188typedef struct pcmcia_device dev_link_t;
192 189
193#define to_pcmcia_dev(n) container_of(n, struct pcmcia_device, dev) 190#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) 191#define to_pcmcia_drv(n) container_of(n, struct pcmcia_driver, drv)
@@ -196,7 +193,7 @@ struct pcmcia_device {
196#define handle_to_pdev(handle) (handle) 193#define handle_to_pdev(handle) (handle)
197#define handle_to_dev(handle) (handle->dev) 194#define handle_to_dev(handle) (handle->dev)
198 195
199#define dev_to_instance(dev) (dev->instance) 196#define dev_to_instance(dev) (dev)
200 197
201/* error reporting */ 198/* error reporting */
202void cs_error(client_handle_t handle, int func, int ret); 199void cs_error(client_handle_t handle, int func, int ret);