patch-2.3.39 linux/drivers/pcmcia/cs.c

Next file: linux/drivers/pcmcia/ds.c
Previous file: linux/drivers/pcmcia/cardbus.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.38/linux/drivers/pcmcia/cs.c linux/drivers/pcmcia/cs.c
@@ -1143,6 +1143,29 @@
     return pcmcia_get_window(win, (*win)->index+1, req);
 }
 
+/*=====================================================================
+
+    Return the PCI device associated with a card..
+
+======================================================================*/
+
+#ifdef CONFIG_CARDBUS
+
+struct pci_bus *pcmcia_lookup_bus(client_handle_t handle)
+{
+	socket_info_t *s;
+
+	if (CHECK_HANDLE(handle))
+		return NULL;
+	s = SOCKET(handle);
+	if (!(s->state & SOCKET_CARDBUS))
+		return NULL;
+
+	return s->cap.cb_dev->subordinate;
+}
+
+#endif
+
 /*======================================================================
 
     Get the current socket state bits.  We don't support the latched

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)