Skip to content

Commit

Permalink
[PATCH] pcmcia: socket.functions starts with 1
Browse files Browse the repository at this point in the history
socket.functions is the number of functions, and so must be one larger
than the maximum function number.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
  • Loading branch information
Dominik Brodowski committed Mar 31, 2006
1 parent 159fe8a commit 552dc85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/pcmcia/ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 552dc85

Please sign in to comment.