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] [day] [month] [year] [list]
Message-ID: <4F9905F0.6030402@st.com>
Date:	Thu, 26 Apr 2012 13:53:12 +0530
From:	Viresh Kumar <viresh.kumar@...com>
To:	Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:	"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
	Wan ZongShun <mcuos.com@...il.com>,
	Rob Herring <rob.herring@...xeda.com>,
	Michael Hennerich <michael.hennerich@...log.com>,
	Stephen Warren <swarren@...dia.com>,
	Kyle Manna <kyle.manna@...l7.com>,
	Anirudh Ghayal <aghayal@...eaurora.org>,
	H Hartley Sweeten <hsweeten@...ionengravers.com>,
	Yong Zhang <yong.zhang0@...il.com>,
	Hui Wang <jason77.wang@...il.com>,
	Wanlong Gao <gaowanlong@...fujitsu.com>,
	Wolfram Sang <w.sang@...gutronix.de>,
	Linus Walleij <linus.walleij@...aro.org>,
	Sourav Poddar <sourav.poddar@...com>,
	Felipe Balbi <balbi@...com>,
	Trilok Soni <tsoni@...eaurora.org>,
	Kukjin Kim <kgene.kim@...sung.com>,
	Thomas Abraham <thomas.abraham@...aro.org>,
	Rajeev KUMAR <rajeev-dlh.kumar@...com>,
	Rakesh Iyer <riyer@...dia.com>,
	Olof Johansson <olof@...om.net>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 1/2] Input: matrix-keymap - uninline and prepare for device
 tree support

On 4/26/2012 1:47 PM, Dmitry Torokhov wrote:
> diff --git a/drivers/input/keyboard/spear-keyboard.c b/drivers/input/keyboard/spear-keyboard.c
> index 3b6b528..7c8f2bc 100644
> --- a/drivers/input/keyboard/spear-keyboard.c
> +++ b/drivers/input/keyboard/spear-keyboard.c
> @@ -49,7 +49,9 @@
>  #define KEY_VALUE      0x00FFFFFF
>  #define ROW_MASK       0xF0
>  #define COLUMN_MASK    0x0F
> -#define ROW_SHIFT      4
> +#define NUM_ROWS       16
> +#define NUM_COLS       16
> +
>  #define KEY_MATRIX_SHIFT       6
> 
>  struct spear_kbd {
> @@ -60,7 +62,7 @@ struct spear_kbd {
>         unsigned int irq;
>         unsigned int mode;
>         unsigned short last_key;
> -       unsigned short keycodes[256];
> +       unsigned short keycodes[NUM_ROWS * NUM_COLS];
>  };
> 
>  static irqreturn_t spear_kbd_interrupt(int irq, void *dev_id)
> @@ -212,18 +214,17 @@ static int __devinit spear_kbd_probe(struct platform_device *pdev)
>         input_dev->open = spear_kbd_open;
>         input_dev->close = spear_kbd_close;
> 
> -       __set_bit(EV_KEY, input_dev->evbit);
> +       error = matrix_keypad_build_keymap(keymap, NULL, NUM_ROWS, NUM_COLS,
> +                                          kbd->keycodes, input_dev);
> +       if (error) {
> +               dev_err(&pdev->dev, "Failed to build keymap\n");
> +               goto errr_put_clk;
> +       }
> +
>         if (pdata->rep)
>                 __set_bit(EV_REP, input_dev->evbit);
>         input_set_capability(input_dev, EV_MSC, MSC_SCAN);
> 
> -       input_dev->keycode = kbd->keycodes;
> -       input_dev->keycodesize = sizeof(kbd->keycodes[0]);
> -       input_dev->keycodemax = ARRAY_SIZE(kbd->keycodes);
> -
> -       matrix_keypad_build_keymap(keymap, ROW_SHIFT,
> -                       input_dev->keycode, input_dev->keybit);
> -
>         input_set_drvdata(input_dev, kbd);
> 
>         error = request_irq(irq, spear_kbd_interrupt, 0, "keyboard", kbd);

Have you rebased these patches over my patchset for SPEAr and Tegra?

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