aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/ds_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pcmcia/ds_internal.h')
-rw-r--r--drivers/pcmcia/ds_internal.h45
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
3struct user_info_t;
4
5/* Socket state information */
6struct 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};
33extern spinlock_t pcmcia_dev_list_lock; 3extern spinlock_t pcmcia_dev_list_lock;
34
35extern struct bus_type pcmcia_bus_type; 4extern struct bus_type pcmcia_bus_type;
36 5
37
38extern struct pcmcia_device * pcmcia_get_dev(struct pcmcia_device *p_dev); 6extern struct pcmcia_device * pcmcia_get_dev(struct pcmcia_device *p_dev);
39extern void pcmcia_put_dev(struct pcmcia_device *p_dev); 7extern void pcmcia_put_dev(struct pcmcia_device *p_dev);
40 8
41struct pcmcia_bus_socket *pcmcia_get_bus_socket(struct pcmcia_bus_socket *s); 9struct pcmcia_device * pcmcia_device_add(struct pcmcia_socket *s, unsigned int function);
42void pcmcia_put_bus_socket(struct pcmcia_bus_socket *s);
43
44struct 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
47extern void __init pcmcia_setup_ioctl(void); 12extern void __init pcmcia_setup_ioctl(void);
48extern void __exit pcmcia_cleanup_ioctl(void); 13extern void __exit pcmcia_cleanup_ioctl(void);
49extern void handle_event(struct pcmcia_bus_socket *s, event_t event); 14extern void handle_event(struct pcmcia_socket *s, event_t event);
50extern int handle_request(struct pcmcia_bus_socket *s, event_t event); 15extern int handle_request(struct pcmcia_socket *s, event_t event);
51#else 16#else
52static inline void __init pcmcia_setup_ioctl(void) { return; } 17static inline void __init pcmcia_setup_ioctl(void) { return; }
53static inline void __init pcmcia_cleanup_ioctl(void) { return; } 18static inline void __init pcmcia_cleanup_ioctl(void) { return; }
54static inline void handle_event(struct pcmcia_bus_socket *s, event_t event) { return; } 19static inline void handle_event(struct pcmcia_socket *s, event_t event) { return; }
55static inline int handle_request(struct pcmcia_bus_socket *s, event_t event) { return CS_SUCCESS; } 20static inline int handle_request(struct pcmcia_socket *s, event_t event) { return CS_SUCCESS; }
56#endif 21#endif