diff options
Diffstat (limited to 'drivers/pcmcia/ds_internal.h')
-rw-r--r-- | drivers/pcmcia/ds_internal.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/drivers/pcmcia/ds_internal.h b/drivers/pcmcia/ds_internal.h new file mode 100644 index 000000000000..0de90e5e67a7 --- /dev/null +++ b/drivers/pcmcia/ds_internal.h | |||
@@ -0,0 +1,55 @@ | |||
1 | /* ds_internal.h - internal header for 16-bit PCMCIA devices management */ | ||
2 | |||
3 | struct user_info_t; | ||
4 | |||
5 | /* Socket state information */ | ||
6 | struct pcmcia_bus_socket { | ||
7 | struct kref refcount; | ||
8 | struct pcmcia_callback callback; | ||
9 | int state; | ||
10 | struct pcmcia_socket *parent; | ||
11 | |||
12 | /* the PCMCIA devices connected to this socket (normally one, more | ||
13 | * for multifunction devices: */ | ||
14 | struct list_head devices_list; | ||
15 | u8 device_count; /* the number of devices, used | ||
16 | * only internally and subject | ||
17 | * to incorrectness and change */ | ||
18 | |||
19 | u8 device_add_pending; | ||
20 | struct work_struct device_add; | ||
21 | |||
22 | |||
23 | #ifdef CONFIG_PCMCIA_IOCTL | ||
24 | struct user_info_t *user; | ||
25 | wait_queue_head_t queue; | ||
26 | #endif | ||
27 | }; | ||
28 | extern spinlock_t pcmcia_dev_list_lock; | ||
29 | |||
30 | extern struct bus_type pcmcia_bus_type; | ||
31 | |||
32 | |||
33 | #define DS_SOCKET_PRESENT 0x01 | ||
34 | #define DS_SOCKET_BUSY 0x02 | ||
35 | #define DS_SOCKET_DEAD 0x80 | ||
36 | |||
37 | extern struct pcmcia_device * pcmcia_get_dev(struct pcmcia_device *p_dev); | ||
38 | extern void pcmcia_put_dev(struct pcmcia_device *p_dev); | ||
39 | |||
40 | struct pcmcia_bus_socket *pcmcia_get_bus_socket(struct pcmcia_bus_socket *s); | ||
41 | void pcmcia_put_bus_socket(struct pcmcia_bus_socket *s); | ||
42 | |||
43 | struct pcmcia_device * pcmcia_device_add(struct pcmcia_bus_socket *s, unsigned int function); | ||
44 | |||
45 | #ifdef CONFIG_PCMCIA_IOCTL | ||
46 | extern void __init pcmcia_setup_ioctl(void); | ||
47 | extern void __exit pcmcia_cleanup_ioctl(void); | ||
48 | extern void handle_event(struct pcmcia_bus_socket *s, event_t event); | ||
49 | extern int handle_request(struct pcmcia_bus_socket *s, event_t event); | ||
50 | #else | ||
51 | static inline void __init pcmcia_setup_ioctl(void) { return; } | ||
52 | static inline void __init pcmcia_cleanup_ioctl(void) { return; } | ||
53 | static inline void handle_event(struct pcmcia_bus_socket *s, event_t event) { return; } | ||
54 | static inline int handle_request(struct pcmcia_bus_socket *s, event_t event) { return CS_SUCCESS; } | ||
55 | #endif | ||