]> err.no Git - linux-2.6/blobdiff - include/pcmcia/ds.h
[PATCH] pcmcia: remove unused p_dev->state flags
[linux-2.6] / include / pcmcia / ds.h
index c53a0604e4414ab96f4237e66d841ac458dc5920..93a7ebc341561fd58fafe6fcb042d9f65027f59e 100644 (file)
@@ -39,7 +39,7 @@ typedef struct win_info_t {
 typedef struct bind_info_t {
     dev_info_t         dev_info;
     u_char             function;
-    struct dev_link_t  *instance;
+    struct pcmcia_device *instance;
     char               name[DEV_NAME_LEN];
     u_short            major, minor;
     void               *next;
@@ -103,27 +103,11 @@ typedef struct dev_node_t {
     struct dev_node_t  *next;
 } dev_node_t;
 
-typedef struct dev_link_t {
-    dev_node_t         *dev;
-    u_int              state, open;
-    wait_queue_head_t  pending;
-    client_handle_t    handle;
-    io_req_t           io;
-    irq_req_t          irq;
-    config_req_t       conf;
-    window_handle_t    win;
-    void               *priv;
-    struct dev_link_t  *next;
-} dev_link_t;
-
 /* Flags for device state */
 #define DEV_PRESENT            0x01
 #define DEV_CONFIG             0x02
-#define DEV_STALE_CONFIG       0x04    /* release on close */
-#define DEV_STALE_LINK         0x08    /* detach on release */
+#define DEV_SUSPEND_NORELEASE  0x04
 #define DEV_CONFIG_PENDING     0x10
-#define DEV_RELEASE_PENDING    0x20
-#define DEV_SUSPEND            0x40
 #define DEV_BUSY               0x80
 
 #define DEV_OK(l) \
@@ -131,12 +115,10 @@ typedef struct dev_link_t {
 
 
 struct pcmcia_socket;
+struct config_t;
 
 struct pcmcia_driver {
-       dev_link_t              *(*attach)(void);
-       int (*event)            (event_t event, int priority,
-                                event_callback_args_t *);
-
+       int (*probe)            (struct pcmcia_device *dev);
        void (*remove)          (struct pcmcia_device *dev);
 
        int (*suspend)          (struct pcmcia_device *dev);
@@ -163,14 +145,24 @@ struct pcmcia_device {
        /* the hardware "function" device; certain subdevices can
         * share one hardware "function" device. */
        u8                      func;
+       struct config_t*        function_config;
 
        struct list_head        socket_device_list;
 
-       /* deprecated, a cleaned up version will be moved into this
-          struct soon */
-       dev_link_t              *instance;
-       event_callback_args_t   event_callback_args;
+       /* deprecated, will be cleaned up soon */
+       dev_node_t              *dev_node;
        u_int                   state;
+       u_int                   open;
+       io_req_t                io;
+       irq_req_t               irq;
+       config_req_t            conf;
+       window_handle_t         win;
+       void                    *priv;
+
+       u_int                   p_state;
+
+       u8                      suspended:1;
+       u8                      reserved:3;
 
        /* information about this device */
        u8                      has_manf_id:1;
@@ -178,7 +170,6 @@ struct pcmcia_device {
        u8                      has_func_id:1;
 
        u8                      allow_func_id_match:1;
-       u8                      reserved:4;
 
        u8                      func_id;
        u16                     manf_id;
@@ -186,22 +177,21 @@ struct pcmcia_device {
 
        char *                  prod_id[4];
 
+       struct device           dev;
+
+#ifdef CONFIG_PCMCIA_IOCTL
        /* device driver wanted by cardmgr */
        struct pcmcia_driver *  cardmgr;
-
-       struct device           dev;
+#endif
 };
 
 #define to_pcmcia_dev(n) container_of(n, struct pcmcia_device, dev)
 #define to_pcmcia_drv(n) container_of(n, struct pcmcia_driver, drv)
 
-#define handle_to_pdev(handle) (handle)
 #define handle_to_dev(handle) (handle->dev)
 
-#define dev_to_instance(dev) (dev->instance)
-
 /* error reporting */
-void cs_error(client_handle_t handle, int func, int ret);
+void cs_error(struct pcmcia_device *handle, int func, int ret);
 
 #endif /* __KERNEL__ */
 #endif /* _LINUX_DS_H */