提交 552dc85d 编写于 作者: D Dominik Brodowski

[PATCH] pcmcia: socket.functions starts with 1

socket.functions is the number of functions, and so must be one larger
than the maximum function number.
Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
上级 159fe8a8
......@@ -588,8 +588,8 @@ struct pcmcia_device * pcmcia_device_add(struct pcmcia_socket *s, unsigned int f
p_dev->socket = s;
p_dev->device_no = (s->device_count++);
p_dev->func = function;
if (s->functions < function)
s->functions = function;
if (s->functions <= function)
s->functions = function + 1;
p_dev->dev.bus = &pcmcia_bus_type;
p_dev->dev.parent = s->dev.dev;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册