diff options
Diffstat (limited to 'drivers/pcmcia/ds.c')
-rw-r--r-- | drivers/pcmcia/ds.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index ad93ebd7b2a2..cb6036d89e59 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/firmware.h> | 24 | #include <linux/firmware.h> |
25 | #include <linux/kref.h> | 25 | #include <linux/kref.h> |
26 | #include <linux/dma-mapping.h> | 26 | #include <linux/dma-mapping.h> |
27 | #include <linux/slab.h> | ||
27 | 28 | ||
28 | #include <pcmcia/cs_types.h> | 29 | #include <pcmcia/cs_types.h> |
29 | #include <pcmcia/cs.h> | 30 | #include <pcmcia/cs.h> |
@@ -509,8 +510,12 @@ struct pcmcia_device *pcmcia_device_add(struct pcmcia_socket *s, unsigned int fu | |||
509 | p_dev->device_no = (s->device_count++); | 510 | p_dev->device_no = (s->device_count++); |
510 | mutex_unlock(&s->ops_mutex); | 511 | mutex_unlock(&s->ops_mutex); |
511 | 512 | ||
512 | /* max of 2 devices per card */ | 513 | /* max of 2 PFC devices */ |
513 | if (p_dev->device_no >= 2) | 514 | if ((p_dev->device_no >= 2) && (function == 0)) |
515 | goto err_free; | ||
516 | |||
517 | /* max of 4 devices overall */ | ||
518 | if (p_dev->device_no >= 4) | ||
514 | goto err_free; | 519 | goto err_free; |
515 | 520 | ||
516 | p_dev->socket = s; | 521 | p_dev->socket = s; |