Skip to content

Commit

Permalink
pcmcia: allow for four multifunction subdevices (again)
Browse files Browse the repository at this point in the history
Commit aa584ca broke what 6cf5be5 had already fixed: there may
be four multifunction devices, but just two pseudo-multifunction
devices per PCMCIA card.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
  • Loading branch information
Dominik Brodowski committed Mar 24, 2010
1 parent 9713ab2 commit 7d7ba8d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/pcmcia/ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7d7ba8d

Please sign in to comment.