diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2005-06-27 19:28:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-27 21:03:07 -0400 |
commit | f602ff7eb4e44e7245bfeeba4d078144703fcd76 (patch) | |
tree | e919cf5470a7e963ae4ce9f21b7fa1ed3bd4cb71 | |
parent | ff1fa9ef3c9fb23a6baa06b63f4bdf3de089b29a (diff) |
[PATCH] pcmcia: match "anonymous" cards
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>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | drivers/pcmcia/ds.c | 9 | ||||
-rw-r--r-- | include/linux/mod_devicetable.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index f657a2a77b2b..66680699e913 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c | |||
@@ -746,6 +746,15 @@ static inline int pcmcia_devmatch(struct pcmcia_device *dev, | |||
746 | } | 746 | } |
747 | } | 747 | } |
748 | 748 | ||
749 | if (did->match_flags & PCMCIA_DEV_ID_MATCH_ANONYMOUS) { | ||
750 | int i; | ||
751 | for (i=0; i<4; i++) | ||
752 | if (dev->prod_id[i]) | ||
753 | return 0; | ||
754 | if (dev->has_manf_id || dev->has_card_id || dev->has_func_id) | ||
755 | return 0; | ||
756 | } | ||
757 | |||
749 | dev->dev.driver_data = (void *) did; | 758 | dev->dev.driver_data = (void *) did; |
750 | 759 | ||
751 | return 1; | 760 | return 1; |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index c0106d68bb6d..8a8dc82a941d 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -209,5 +209,6 @@ struct pcmcia_device_id { | |||
209 | #define PCMCIA_DEV_ID_MATCH_PROD_ID4 0x0080 | 209 | #define PCMCIA_DEV_ID_MATCH_PROD_ID4 0x0080 |
210 | #define PCMCIA_DEV_ID_MATCH_DEVICE_NO 0x0100 | 210 | #define PCMCIA_DEV_ID_MATCH_DEVICE_NO 0x0100 |
211 | #define PCMCIA_DEV_ID_MATCH_FAKE_CIS 0x0200 | 211 | #define PCMCIA_DEV_ID_MATCH_FAKE_CIS 0x0200 |
212 | #define PCMCIA_DEV_ID_MATCH_ANONYMOUS 0x0400 | ||
212 | 213 | ||
213 | #endif /* LINUX_MOD_DEVICETABLE_H */ | 214 | #endif /* LINUX_MOD_DEVICETABLE_H */ |