[PATCH 14/33] pcmcia: socket.functions starts with 1

Dominik Brodowski linux at dominikbrodowski.net
Fri Mar 31 15:11:47 EST 2006


socket.functions is the number of functions, and so must be one larger
than the maximum function number.

Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>

---

 drivers/pcmcia/ds.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

552dc85dfed6b6a74a3a01c4ba277ee09797dd0a
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 211aa84..16159e9 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -588,8 +588,8 @@ struct pcmcia_device * pcmcia_device_add
 	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;
-- 
1.2.4




More information about the linux-pcmcia mailing list