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: <20090812024620.E4E10526EC9@mailhub.coreip.homeip.net>
Date:	Tue, 11 Aug 2009 19:15:45 -0700
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Xiangfu Liu <xiangfu@...hardware.com>
Cc:	"Hard- and Software Development, Kernel, Distribution, Roadmap" 
	<developer@...ts.qi-hardware.com>, linux-kernel@...r.kernel.org
Subject: Re: qi_lb60_keypad driver question?

Hi,

On Wed, Aug 12, 2009 at 12:32:57AM +0800, Xiangfu Liu wrote:
> Hi there
> I have try to write the keypad driver,
> but I don't know if this is the right direction.

These kind of questions are better suited for teh linux-input mailing
list.

> attach is the patch for the openwrt[1] .25 kernel.
> 

Which is not telling most of the people anything. For example I have no
idea whta .25 kernel is.

> diff --git a/drivers/input/keyboard/matrix_keypad.c b/drivers/input/keyboard/matrix_keypad.c
> new file mode 100644
> index 0000000..a51273e
> --- /dev/null
> +++ b/drivers/input/keyboard/matrix_keypad.c
> @@ -0,0 +1,347 @@
> +/*
> + * drivers/input/keyboard/matrix_keypad.c
> + *
> + *  GPIO driven matrix keyboard driver
> + *

There is already an updated version of matrix_keypad driver in mainline,
you don't need to repost it.

> diff --git a/drivers/input/keyboard/qi_lb60_keypad.c b/drivers/input/keyboard/qi_lb60_keypad.c
> new file mode 100644
> index 0000000..0b2e548
> --- /dev/null
> +++ b/drivers/input/keyboard/qi_lb60_keypad.c

This should go into arch specific board setup code, not in drivers/input

> +
> +static struct platform_device qi_lb60_device = {
> +	.name		= "qi_lb60-keyboard",
> +	.name		= "matrix-keypad",

You are setting .name twice. Also, statically allocated platform devices
may not be unregistered. Just create this device once in your board init
code instead of having a separate unloadable module.

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