
From: Dominik Brodowski <linux@dominikbrodowski.net>

If a card doesn't provide _any_ information about itself, assume it is a
so-called "anonymous" card.  pcmciamtd will bind to it if it is configured to
do so.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/pcmcia/ds.c             |    9 +++++++++
 25-akpm/include/linux/mod_devicetable.h |    1 +
 2 files changed, 10 insertions(+)

diff -puN drivers/pcmcia/ds.c~pcmcia-match-anonymous-cards drivers/pcmcia/ds.c
--- 25/drivers/pcmcia/ds.c~pcmcia-match-anonymous-cards	Sun Mar  6 17:28:07 2005
+++ 25-akpm/drivers/pcmcia/ds.c	Sun Mar  6 17:28:07 2005
@@ -746,6 +746,15 @@ static inline int pcmcia_devmatch(struct
 		}
 	}
 
+	if (did->match_flags & PCMCIA_DEV_ID_MATCH_ANONYMOUS) {
+		int i;
+		for (i=0; i<4; i++)
+			if (dev->prod_id[i])
+				return 0;
+		if (dev->has_manf_id || dev->has_card_id || dev->has_func_id)
+			return 0;
+	}
+
 	dev->dev.driver_data = (void *) did;
 
 	return 1;
diff -puN include/linux/mod_devicetable.h~pcmcia-match-anonymous-cards include/linux/mod_devicetable.h
--- 25/include/linux/mod_devicetable.h~pcmcia-match-anonymous-cards	Sun Mar  6 17:28:07 2005
+++ 25-akpm/include/linux/mod_devicetable.h	Sun Mar  6 17:28:07 2005
@@ -209,5 +209,6 @@ struct pcmcia_device_id {
 #define PCMCIA_DEV_ID_MATCH_PROD_ID4	0x0080
 #define PCMCIA_DEV_ID_MATCH_DEVICE_NO	0x0100
 #define PCMCIA_DEV_ID_MATCH_FAKE_CIS	0x0200
+#define PCMCIA_DEV_ID_MATCH_ANONYMOUS	0x0400
 
 #endif /* LINUX_MOD_DEVICETABLE_H */
_
