From: Andrew Morton <akpm@linux-foundation.org>
To: Daniel Mierswa <impulze@impulze.org>
Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org
Subject: Re: [PATCH] Fujitsu Amilo PA 1510 key-release events quirk
Date: Sat, 29 Nov 2008 23:41:48 -0800 [thread overview]
Message-ID: <20081129234148.d2b9904e.akpm@linux-foundation.org> (raw)
In-Reply-To: <4931BB48.9010706@impulze.org>
On Sat, 29 Nov 2008 22:59:36 +0100 Daniel Mierswa <impulze@impulze.org> wrote:
> From: Daniel Mierswa <impulze@impulze.org>
> Date: Sat, 29 Nov 2008 22:40:20 +0100
> Subject: [PATCH] Fujitsu Siemens Amilo PA 1510 quirks
>
> The volume up and down keys on the Fujitsu Siemens Amilo PA 1510 laptop
> won't generate release events, so we have to do that. Use the same
> way that is already used with other models.
> ---
> drivers/input/keyboard/atkbd.c | 22 ++++++++++++++++++++++
> 1 files changed, 22 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
> index 99ef522..1250242 100644
> --- a/drivers/input/keyboard/atkbd.c
> +++ b/drivers/input/keyboard/atkbd.c
> @@ -845,6 +845,19 @@ static void atkbd_disconnect(struct serio *serio)
> atkbd->force_release_mask);
>
> /*
> + * The volume up and volume down special keys on a Fujitsu Amilo PA 1510 laptop
> + * do not generate release events so we have to do it ourselves.
> + */
> +static void atkbd_amilopa1510_keymap_fixup(struct atkbd *atkbd)
> +{
> + const unsigned int forced_release_keys[] = {
> + 0xb0, 0xae,
> + };
> +
> + GEN_RELEASE_EVENT
> +}
It's best to make forced_release_keys static as well - there is no need
to build this array on the stack at runtime. The compiler _could_
perform this optimisation itself andallegedly it will sometimes do so.
Last time I checked it did not.
> +/*
> * Most special keys (Fn+F?) on Dell laptops do not generate release
> * events so we have to do it ourselves.
> */
> @@ -1463,6 +1476,15 @@ static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = {
> .driver_data = atkbd_dell_laptop_keymap_fixup,
> },
> {
> + .ident = "Fujitsu Amilo PA 1510",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
> + DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Pa 1510"),
> + },
> + .callback = atkbd_setup_fixup,
> + .driver_data = atkbd_amilopa1510_keymap_fixup,
> + },
> + {
> .ident = "HP 2133",
> .matches = {
> DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
prev parent reply other threads:[~2008-11-30 7:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-29 21:59 [PATCH] Fujitsu Amilo PA 1510 key-release events quirk Daniel Mierswa
2008-11-30 7:38 ` Andrew Morton
2008-11-30 7:42 ` Andrew Morton
2008-12-01 20:59 ` [PATCH] Fujitsu Amilo PA 1510 key-release events quirk (PATCH 1/3) Daniel Mierswa
2008-12-01 21:00 ` [PATCH] Fujitsu Amilo PA 1510 key-release events quirk (PATCH 2/3) Daniel Mierswa
2008-12-01 21:01 ` [PATCH] Fujitsu Amilo PA 1510 key-release events quirk (PATCH 3/3) Daniel Mierswa
2008-12-03 6:11 ` Andrew Morton
2008-11-30 7:41 ` Andrew Morton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081129234148.d2b9904e.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=impulze@impulze.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.