lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 6 Aug 2014 23:20:33 -0700
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Daniel Mack <zonque@...il.com>
Cc:	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Input: cap1106 - allow changing key mapping from
 userspace

On Sun, Jul 20, 2014 at 06:20:49PM -0700, Dmitry Torokhov wrote:
> Wire up support for EVIOC{G|S}KEYCODE to allow users change key mappings
> from userspace.
> 
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@...il.com>
> ---
> 
> Just compiled, not tested.

*ping* Any chance you could give it a try? Thanks!

> 
>  drivers/input/keyboard/cap1106.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/input/keyboard/cap1106.c b/drivers/input/keyboard/cap1106.c
> index f7d7a0d..180b184 100644
> --- a/drivers/input/keyboard/cap1106.c
> +++ b/drivers/input/keyboard/cap1106.c
> @@ -64,7 +64,7 @@ struct cap1106_priv {
>  	struct input_dev *idev;
>  
>  	/* config */
> -	unsigned int keycodes[CAP1106_NUM_CHN];
> +	unsigned short keycodes[CAP1106_NUM_CHN];
>  };
>  
>  static const struct reg_default cap1106_reg_defaults[] = {
> @@ -272,6 +272,12 @@ static int cap1106_i2c_probe(struct i2c_client *i2c_client,
>  	for (i = 0; i < CAP1106_NUM_CHN; i++)
>  		__set_bit(priv->keycodes[i], priv->idev->keybit);
>  
> +	__clear_bit(KEY_RESERVED, priv->idev->keybit);
> +
> +	priv->idev->keycode = priv->keycodes;
> +	priv->idev->keycodesize = sizeof(priv->keycodes[0]);
> +	priv->idev->keycodemax = ARRAY_SIZE(priv->keycodes);
> +
>  	priv->idev->id.vendor = CAP1106_MANUFACTURER_ID;
>  	priv->idev->id.product = CAP1106_PRODUCT_ID;
>  	priv->idev->id.version = rev;
> -- 
> 2.0.0.526.g5318336
> 
> 
> -- 
> Dmitry

-- 
Dmitry
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ