three trivial PCMCIA patches

Dominik Brodowski linux at brodo.de
Wed Apr 16 01:30:18 BST 2003


Hi Russell,

Could you please merge them into the pcmcia-bk-tree and push them Linus-ward
soon? All three are really trivial.

1.) cardmgr_compile 
2.) cardbus_lockups
3.) remove_unused_files

	Dominik
-------------- next part --------------
[PCMCIA] CardBus cb_free doesn't check socket capabilities [Pavel Roskin]

>From Pavel Roskin

cb_free() is called from shutdown_socket() regardless of whether the
socket supports CardBus.  plx9052 sets cb_dev to NULL in its capabilities.
So pci_remove_behind_bridge() is called on NULL and crashes.

All other drivers not capable of supporting CardBus are affected if
CardBus support is enabled.

diff -ruN linux-original/drivers/pcmcia/cardbus.c linux/drivers/pcmcia/cardbus.c
--- linux-original/drivers/pcmcia/cardbus.c	2003-04-15 23:57:35.000000000 +0200
+++ linux/drivers/pcmcia/cardbus.c	2003-04-16 00:11:49.000000000 +0200
@@ -270,5 +270,6 @@
 {
 	struct pci_dev *bridge = s->cap.cb_dev;
 
-	pci_remove_behind_bridge(bridge);
+	if (bridge)
+		pci_remove_behind_bridge(bridge);
 }
-------------- next part --------------
[PCMCIA] Fix compilation of cardmgr [Pavel Roskin]

>From Pavel Roskin

"ds.h should not be including linux/device.h when compiling userspace
code."

diff -ruN linux-original/include/pcmcia/ds.h linux/include/pcmcia/ds.h
--- linux-original/include/pcmcia/ds.h	2003-04-15 23:57:37.000000000 +0200
+++ linux/include/pcmcia/ds.h	2003-04-16 00:04:32.000000000 +0200
@@ -31,7 +31,6 @@
 #define _LINUX_DS_H
 
 #include <pcmcia/bulkmem.h>
-#include <linux/device.h>
 #include <pcmcia/cs_types.h>
 
 typedef struct tuple_parse_t {
@@ -107,6 +106,7 @@
 #define DS_BIND_MTD			_IOWR('d', 64, mtd_info_t)
 
 #ifdef __KERNEL__
+#include <linux/device.h>
 
 typedef struct dev_node_t {
     char		dev_name[DEV_NAME_LEN];
-------------- next part --------------
[PCMCIA] remove unused files [Christoph Hellwig]

>From Christoph Hellwig

There's no need to keep the stubs around.

diff -ruN linux-original/drivers/net/wireless/orinoco_cs.c linux/drivers/net/wireless/orinoco_cs.c
--- linux-original/drivers/net/wireless/orinoco_cs.c	2003-04-15 23:57:34.000000000 +0200
+++ linux/drivers/net/wireless/orinoco_cs.c	2003-04-16 00:14:34.000000000 +0200
@@ -35,7 +35,6 @@
 #include <pcmcia/cistpl.h>
 #include <pcmcia/cisreg.h>
 #include <pcmcia/ds.h>
-#include <pcmcia/bus_ops.h>
 
 #include <asm/uaccess.h>
 #include <asm/io.h>
diff -ruN linux-original/include/pcmcia/bus_ops.h linux/include/pcmcia/bus_ops.h
--- linux-original/include/pcmcia/bus_ops.h	2003-04-15 23:57:37.000000000 +0200
+++ linux/include/pcmcia/bus_ops.h	2003-04-16 00:14:34.000000000 +0200
@@ -1,2 +0,0 @@
-/* now empty */
-#warning please remove the reference to this file
diff -ruN linux-original/include/pcmcia/driver_ops.h linux/include/pcmcia/driver_ops.h
--- linux-original/include/pcmcia/driver_ops.h	2003-04-15 23:57:37.000000000 +0200
+++ linux/include/pcmcia/driver_ops.h	2003-04-16 00:14:34.000000000 +0200
@@ -1,2 +0,0 @@
-/* now empty */
-#warning please remove the reference to this file


More information about the linux-pcmcia mailing list