mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-02 16:44:10 +08:00
pcmcia: allow for four multifunction subdevices (again)
Commitaa584ca4
broke what6cf5be51
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>
This commit is contained in:
parent
9713ab28ec
commit
7d7ba8d31e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user