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