aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pcmcia/cs.c')
-rw-r--r--drivers/pcmcia/cs.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index e82859d3227a..e39178fc59d0 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -33,7 +33,6 @@
33#include <asm/irq.h> 33#include <asm/irq.h>
34 34
35#define IN_CARD_SERVICES 35#define IN_CARD_SERVICES
36#include <pcmcia/version.h>
37#include <pcmcia/cs_types.h> 36#include <pcmcia/cs_types.h>
38#include <pcmcia/ss.h> 37#include <pcmcia/ss.h>
39#include <pcmcia/cs.h> 38#include <pcmcia/cs.h>
@@ -216,6 +215,13 @@ int pcmcia_register_socket(struct pcmcia_socket *socket)
216 list_add_tail(&socket->socket_list, &pcmcia_socket_list); 215 list_add_tail(&socket->socket_list, &pcmcia_socket_list);
217 up_write(&pcmcia_socket_list_rwsem); 216 up_write(&pcmcia_socket_list_rwsem);
218 217
218#ifndef CONFIG_CARDBUS
219 /*
220 * If we do not support Cardbus, ensure that
221 * the Cardbus socket capability is disabled.
222 */
223 socket->features &= ~SS_CAP_CARDBUS;
224#endif
219 225
220 /* set proper values in socket->dev */ 226 /* set proper values in socket->dev */
221 socket->dev.class_data = socket; 227 socket->dev.class_data = socket;
@@ -449,11 +455,11 @@ static int socket_setup(struct pcmcia_socket *skt, int initial_delay)
449 } 455 }
450 456
451 if (status & SS_CARDBUS) { 457 if (status & SS_CARDBUS) {
458 if (!(skt->features & SS_CAP_CARDBUS)) {
459 cs_err(skt, "cardbus cards are not supported.\n");
460 return CS_BAD_TYPE;
461 }
452 skt->state |= SOCKET_CARDBUS; 462 skt->state |= SOCKET_CARDBUS;
453#ifndef CONFIG_CARDBUS
454 cs_err(skt, "cardbus cards are not supported.\n");
455 return CS_BAD_TYPE;
456#endif
457 } 463 }
458 464
459 /* 465 /*