From: Daniel Mierswa <impulze@impulze.org>
To: linux-kernel@vger.kernel.org
Cc: linux-input@vger.kernel.org, akpm@linux-foundation.org
Subject: Re: [PATCH] Fujitsu Amilo PA 1510 key-release events quirk (PATCH 1/3)
Date: Mon, 01 Dec 2008 21:59:32 +0100 [thread overview]
Message-ID: <49345034.8050208@impulze.org> (raw)
In-Reply-To: <20081129233826.be959cae.akpm@linux-foundation.org>
[-- Attachment #1: Type: text/plain, Size: 1004 bytes --]
Split patches as requested in "[PATCH] Fujitsu Amilo PA 1510 key-release
events quirk"
Here's the first out of 3.
On 30.11.2008 08:38, Andrew Morton wrote:
> Please don't send more than one patch per email. I shall comment on
> the two patches in two separate replies.
>
done, except that they are three now :)
On 30.11.2008 08:38, Andrew Morton wrote:
> Please also cc linux-input@vger.kernel.org on input-related patches.
>
>
done
On 30.11.2008 08:38, Andrew Morton wrote:
> oh my. Please, no. Just write a C function:
>
> void atkbd_gen_release_event(unsigned int *keys, unsigned nr_keys)
> {
> ...
> }
>
>
done, I prefer that myself, although I first thought it might be a bad
idea to pass around pointers there, since
other developers might expect ARRAY_SIZE to work in gen_release_events.
--
Mierswa, Daniel
If you still don't like it, that's ok: that's why I'm boss. I simply
know better than you do.
--- Linus Torvalds, comp.os.linux.advocacy, 1996/07/22
[-- Attachment #2: atkbd_gen_release_events.patch --]
[-- Type: text/plain, Size: 1910 bytes --]
>From f4889ca0b6895abdd1888cb1b56dd411045780be Mon Sep 17 00:00:00 2001
From: Daniel Mierswa <impulze@impulze.org>
Date: Sun, 30 Nov 2008 13:14:00 +0100
Subject: [PATCH] use function for generation of keyrelease events
---
drivers/input/keyboard/atkbd.c | 27 +++++++++++++++++----------
1 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
index 22016ca..c239745 100644
--- a/drivers/input/keyboard/atkbd.c
+++ b/drivers/input/keyboard/atkbd.c
@@ -834,6 +834,19 @@ static void atkbd_disconnect(struct serio *serio)
}
/*
+ * generate release events for the keycodes given in keys[]
+ */
+static void atkbd_gen_release_event(struct atkbd* atkbd, const unsigned int *keys,
+ unsigned int nr_keys)
+{
+ unsigned int i;
+
+ if (atkbd->set == 2)
+ for (i = 0; i < nr_keys; i++)
+ __set_bit(keys[i], atkbd->force_release_mask);
+}
+
+/*
* Most special keys (Fn+F?) on Dell laptops do not generate release
* events so we have to do it ourselves.
*/
@@ -842,12 +855,9 @@ static void atkbd_dell_laptop_keymap_fixup(struct atkbd *atkbd)
const unsigned int forced_release_keys[] = {
0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8f, 0x93,
};
- int i;
- if (atkbd->set == 2)
- for (i = 0; i < ARRAY_SIZE(forced_release_keys); i++)
- __set_bit(forced_release_keys[i],
- atkbd->force_release_mask);
+ atkbd_gen_release_event(atkbd, forced_release_keys,
+ ARRAY_SIZE(forced_release_keys));
}
/*
@@ -859,12 +869,9 @@ static void atkbd_hp_keymap_fixup(struct atkbd *atkbd)
const unsigned int forced_release_keys[] = {
0x94,
};
- int i;
- if (atkbd->set == 2)
- for (i = 0; i < ARRAY_SIZE(forced_release_keys); i++)
- __set_bit(forced_release_keys[i],
- atkbd->force_release_mask);
+ atkbd_gen_release_event(atkbd, forced_release_keys,
+ ARRAY_SIZE(forced_release_keys));
}
/*
--
1.6.0.4
next prev parent reply other threads:[~2008-12-01 20:59 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 ` Daniel Mierswa [this message]
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 ` [PATCH] Fujitsu Amilo PA 1510 key-release events quirk Andrew Morton
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=49345034.8050208@impulze.org \
--to=impulze@impulze.org \
--cc=akpm@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox