[PATCH 5/9] staging: nvec: ps2: disable/enable mouse on suspend/resume

Dan Carpenter dan.carpenter at oracle.com
Tue Jan 10 11:53:43 UTC 2012


On Mon, Dec 26, 2011 at 05:57:36PM +0100, Julian Andres Klode wrote:
> From: Marc Dietrich <marvin24 at gmx.de>
> 
> This change makes the touchpad buttons work after suspend/resume.
> 
> Signed-off-by: Marc Dietrich <marvin24 at gmx.de>
> Signed-off-by: Julian Andres Klode <jak at jak-linux.org>
> ---
>  drivers/staging/nvec/nvec_ps2.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/staging/nvec/nvec_ps2.c b/drivers/staging/nvec/nvec_ps2.c
> index 7f470ba..4be3d22 100644
> --- a/drivers/staging/nvec/nvec_ps2.c
> +++ b/drivers/staging/nvec/nvec_ps2.c
> @@ -123,6 +123,9 @@ static int nvec_mouse_suspend(struct platform_device *pdev, pm_message_t state)
>  {
>  	struct nvec_chip *nvec = dev_get_drvdata(pdev->dev.parent);
>  
> +	/* disable mouse */
> +	nvec_write_async(nvec, "\x06\xf4", 2);

Just a comment.  It would better to make this define like Marc did
for MOUSE_RESET.

#define MOUSE_DISABLE {'\x06', '\xf4'}
nvec_write_async(nvec, MOUSE_DISABLE, sizeof(MOUSE_DISABLE));

regards,
dan carpenter


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/attachments/20120110/65029d88/attachment.asc>


More information about the devel mailing list