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]
Message-ID: <5421174A.7060101@zonque.org>
Date:	Tue, 23 Sep 2014 08:46:34 +0200
From:	Daniel Mack <daniel@...que.org>
To:	Matt Ranostay <mranostay@...il.com>, galak@...eaurora.org,
	dmitry.torokhov@...il.com, zonque@...il.com,
	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
	robh+dt@...nel.org
CC:	devicetree@...r.kernel.org
Subject: Re: [PATCH v2 1/2] cap1106: Add support for various cap11xx devices

On 09/23/2014 06:04 AM, Matt Ranostay wrote:
> diff --git a/drivers/input/keyboard/cap1106.c b/drivers/input/keyboard/cap1106.c
> index d70b65a..07f9e88 100644
> --- a/drivers/input/keyboard/cap1106.c
> +++ b/drivers/input/keyboard/cap1106.c
> @@ -55,8 +55,6 @@
>  #define CAP1106_REG_MANUFACTURER_ID	0xfe
>  #define CAP1106_REG_REVISION		0xff
>  
> -#define CAP1106_NUM_CHN 6
> -#define CAP1106_PRODUCT_ID	0x55
>  #define CAP1106_MANUFACTURER_ID	0x5d
>  
>  struct cap1106_priv {
> @@ -64,7 +62,25 @@ struct cap1106_priv {
>  	struct input_dev *idev;
>  
>  	/* config */
> -	unsigned short keycodes[CAP1106_NUM_CHN];
> +	u32 *keycodes;
> +	unsigned int num_channels;
> +};
> +
> +struct cap11xx_hw_model {
> +	uint8_t product_id;
> +	unsigned int num_channels;
> +};
> +
> +enum {
> +	CAP1106,
> +	CAP1126,
> +	CAP1188,
> +};
> +
> +struct cap11xx_hw_model cap11xx_devices[] = {

This can be static const.

And, as I said, there should be a 3rd patch that renames the file and
its functions, structs, defines etc to the more generic "11xx" variants.


Thanks,
Daniel

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