From daf9230050c947e443aaac261772317665a6c83f Mon Sep 17 00:00:00 2001 From: Dominik Brodowski Date: Wed, 24 Mar 2010 10:49:14 +0100 Subject: [PATCH] --- yaml --- r: 189104 b: refs/heads/master c: 7d7ba8d31eb293016bc91a5c8fc36b21fd917265 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/pcmcia/ds.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 251ee12eccc9..326149b3f31c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9713ab28ec92d0c44b2ac5765dfc26c619d9cadd +refs/heads/master: 7d7ba8d31eb293016bc91a5c8fc36b21fd917265 diff --git a/trunk/drivers/pcmcia/ds.c b/trunk/drivers/pcmcia/ds.c index ad93ebd7b2a2..52d33b2a5bc5 100644 --- a/trunk/drivers/pcmcia/ds.c +++ b/trunk/drivers/pcmcia/ds.c @@ -509,8 +509,12 @@ struct pcmcia_device *pcmcia_device_add(struct pcmcia_socket *s, unsigned int fu p_dev->device_no = (s->device_count++); mutex_unlock(&s->ops_mutex); - /* max of 2 devices per card */ - if (p_dev->device_no >= 2) + /* max of 2 PFC devices */ + if ((p_dev->device_no >= 2) && (function == 0)) + goto err_free; + + /* max of 4 devices overall */ + if (p_dev->device_no >= 4) goto err_free; p_dev->socket = s;