+
+struct pcmcia_device {
+ /* the socket and the device_no [for multifunction devices]
+ uniquely define a pcmcia_device */
+ struct pcmcia_socket *socket;
+
+ char *devname;
+
+ u8 device_no;
+
+ /* 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, will be cleaned up soon */
+ dev_node_t *dev_node;
+ u_int open;
+ io_req_t io;
+ irq_req_t irq;
+ config_req_t conf;
+ window_handle_t win;
+
+ /* Is the device suspended, or in the process of
+ * being removed? */
+ u16 suspended:1;
+ u16 _removed:1;
+
+ /* Flags whether io, irq, win configurations were
+ * requested, and whether the configuration is "locked" */
+ u16 _irq:1;
+ u16 _io:1;
+ u16 _win:4;
+ u16 _locked:1;
+
+ /* Flag whether a "fuzzy" func_id based match is
+ * allowed. */
+ u16 allow_func_id_match:1;
+
+ /* information about this device */
+ u16 has_manf_id:1;
+ u16 has_card_id:1;
+ u16 has_func_id:1;
+
+ u16 reserved:3;
+
+ u8 func_id;
+ u16 manf_id;
+ u16 card_id;
+
+ char * prod_id[4];
+
+ struct device dev;
+
+#ifdef CONFIG_PCMCIA_IOCTL
+ /* device driver wanted by cardmgr */
+ struct pcmcia_driver * cardmgr;
+#endif
+
+ /* data private to drivers */
+ void *priv;
+};
+
+#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_dev(handle) (handle->dev)
+