[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <26856.1179166364@argus.EECS.Berkeley.EDU>
Date: Mon, 14 May 2007 11:12:44 -0700
From: Jason Riedy <ejr@...berkeley.edu>
To: Dmitry Torokhov <dtor@...ightbb.com>
cc: Remi Colinet <remi.colinet@...e.fr>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: Regression in 2.6.21-mm1 (git-input) on Dell D610 laptop
And Dmitry Torokhov writes:
> I don't think so. Could you please try the patch below? Thanks!
The appended patch on top of yours fixes the too-early access of
psmouse->private. I don't know the expected lifetime of
psmouse->private, so I chickened out of simply assigning priv
earlier.
BTW, why do you pass psmouse down through the initializations
rather than ps2dev and private?
Jason, using git's index, dammit...
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index 2aeb299..990d2a5 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -384,10 +384,9 @@ static int alps_poll(struct psmouse *psmouse)
return 0;
}
-static int alps_hw_init(struct psmouse *psmouse, int *version)
+static int alps_hw_init(struct psmouse *psmouse, struct alps_data *priv,
+ int *version)
{
- struct alps_data *priv = psmouse->private;
-
priv->i = alps_get_model(psmouse, version);
if (!priv->i)
return -1;
@@ -421,7 +420,7 @@ static int alps_reconnect(struct psmouse *psmouse)
{
psmouse_reset(psmouse);
- if (alps_hw_init(psmouse, NULL))
+ if (alps_hw_init(psmouse, (struct alps_data *)psmouse->private, NULL))
return -1;
return 0;
@@ -449,7 +448,7 @@ int alps_init(struct psmouse *psmouse)
priv->dev2 = dev2;
- if (alps_hw_init(psmouse, &version))
+ if (alps_hw_init(psmouse, priv, &version))
goto init_fail;
dev1->evbit[LONG(EV_KEY)] |= BIT(EV_KEY);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists