[v3] serio: add support for PS2Mult multiplexer protocol
diff mbox

Message ID 20101007163606.GA24406@core.coreip.homeip.net
State Superseded
Headers show

Commit Message

Dmitry Torokhov Oct. 7, 2010, 4:36 p.m. UTC
None

Patch
diff mbox

diff --git a/drivers/input/serio/ps2mult.c b/drivers/input/serio/ps2mult.c
index 3664398..52b58de 100644
--- a/drivers/input/serio/ps2mult.c
+++ b/drivers/input/serio/ps2mult.c
@@ -144,9 +144,6 @@  static int ps2mult_create_port(struct ps2mult *psm, int i)
 	serio->parent = psm->mx_serio;
 	serio->port_data = &psm->ports[i];
 
-	serio_register_port(serio);
-	dev_info(&serio->dev, "%s port at %s\n", serio->name, mx_serio->phys);
-
 	return 0;
 }
 
@@ -196,8 +193,12 @@  static int ps2mult_connect(struct serio *serio, struct serio_driver *drv)
 
 	ps2mult_reset(psm);
 
-	for (i = 0; i <  PS2MULT_NUM_PORTS; i++)
-		serio_register_port(psm->ports[i].serio);
+	for (i = 0; i <  PS2MULT_NUM_PORTS; i++) {
+		struct serio *s = psm->ports[i].serio;
+
+		dev_info(&serio->dev, "%s port at %s\n", s->name, serio->phys);
+		serio_register_port(s);
+	}
 
 	return 0;