lkml.org 
[lkml]   [2007]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: Regression in 2.6.21-mm1 (git-input) on Dell D610 laptop
Date
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2007-05-14 20:15    [W:0.189 / U:0.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site