Skip to contentSkip to conversation

pcmcia: driver_socket as device_class interface

PATCH New Dominik Brodowski 1 participant 1 message Feb 27, 2003 Pcmcia

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pcmcia: driver_socket as device_class interface

[depends on the pcmcia: bus_type pcmcia_bus_type, pcmcia-drivers patch sent to you a few minutes ago.]

"Driver Servies" will probably become the "bus driver" for PCMCIA
(non-CardBus) cards. So register it as an interface to the device class pcmcia_socket_class. Unfortunately, due to a driver model bug the actual interface_add_data call is commented out. This only means that unloading pcmcia sockets won't currently work, loading/enabling pcmcia sockets should work fine (and does so here).

drivers/pcmcia/cs.c +2 -0
diff -ru linux-original/drivers/pcmcia/cs.c linux/drivers/pcmcia/cs.c
@@ -345,6 +345,7 @@
 
 		s->ss_entry = cls_d->ops;
 		s->sock = i + cls_d->sock_offset;
+		s->s_dev = dev;
 
 		/* base address = 0, map = 0 */
 		s->cis_mem.flags = 0;
@@ -359,6 +360,7 @@
 		socket_table[j] = s;
 		if (j == sockets) sockets++;
 
+		s->socket_table_entry = j;
 		init_socket(s);
 		s->ss_entry->inquire_socket(s->sock, &s->cap);
 #ifdef CONFIG_PROC_FS
drivers/pcmcia/cs_internal.h +5 -1
diff -ru linux-original/drivers/pcmcia/cs_internal.h linux/drivers/pcmcia/cs_internal.h
@@ -158,7 +158,11 @@
 #ifdef CONFIG_PROC_FS
     struct proc_dir_entry	*proc;
 #endif
-    int				use_bus_pm;
+	int			use_bus_pm;
+	struct device		*s_dev;
+	/* TBD: integrate the following contents fully into this struct */
+	void			*ds_info; /* ds_socket_info */
+	int			socket_table_entry;
 } socket_info_t;
 
 /* Flags in config state */
drivers/pcmcia/ds.c +246 -135

608 lines not on this page · raw message

include/pcmcia/ss.h +1 -0
diff -ru linux-original/include/pcmcia/ss.h linux/include/pcmcia/ss.h
@@ -152,6 +152,7 @@
 	struct pccard_operations *ops;		/* see above */
 	void *s_info;				/* socket_info_t */
 	unsigned int use_bus_pm;
+	struct intf_data ds_intf;		/* intf data for driver services */
 };
 
 extern struct device_class pcmcia_socket_class;