summaryrefslogtreecommitdiff
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2006-03-01 14:04:52 +0100
committerDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 17:05:25 +0200
commit552dc85dfed6b6a74a3a01c4ba277ee09797dd0a (patch)
tree9b802fac801cf74618b2ed3ae7f51b2a585123d7 /drivers/pcmcia
parent159fe8a8358c7012d4f1fdacfcf69009ea15b52e (diff)
[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: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/ds.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 211aa84353f..16159e9d1b2 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -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;