Re: [PATCH 3/3] Input: penmount - add PenMount 6250 support

From: Dmitry Torokhov
Date: Fri Sep 09 2011 - 14:08:10 EST


On Fri, Sep 09, 2011 at 11:06:37AM -0700, Dmitry Torokhov wrote:
> On Fri, Sep 09, 2011 at 11:04:19AM -0700, Dmitry Torokhov wrote:
> > On Fri, Sep 09, 2011 at 04:07:47PM +0800, John Sung wrote:
> > > Add multi touch support for PenMount 6250 touch controller.
> > >
> >
> > Given the changes to previous patches, this one turns into:
> >
>
> Also, I wonder if we should do something like this:
>

And if you could give this patch a try that would be great.

Thank you.

--
Dmitry


Input: penmount - simplify unregister procedure

From: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>

Since touchscreen driver does not handle any events to be sent to the
device we can close serio port first and then unregister the input device.

Signed-off-by: Dmitry Torokhov <dtor@xxxxxxx>
---

drivers/input/touchscreen/penmount.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)


diff --git a/drivers/input/touchscreen/penmount.c b/drivers/input/touchscreen/penmount.c
index 7ebed38..618385e 100644
--- a/drivers/input/touchscreen/penmount.c
+++ b/drivers/input/touchscreen/penmount.c
@@ -183,12 +183,12 @@ static void pm_disconnect(struct serio *serio)
{
struct pm *pm = serio_get_drvdata(serio);

- input_get_device(pm->dev);
- input_unregister_device(pm->dev);
serio_close(serio);
- serio_set_drvdata(serio, NULL);
- input_put_device(pm->dev);
+
+ input_unregister_device(pm->dev);
kfree(pm);
+
+ serio_set_drvdata(serio, NULL);
}

/*
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/