From: Christoph Hellwig <hch@infradead.org>
To: Pavel Machek <pavel@ucw.cz>
Cc: alan@redhat.com, kernel list <linux-kernel@vger.kernel.org>
Subject: Re: Toshiba keyboard workaroun
Date: Sun, 23 Feb 2003 11:50:12 +0000 [thread overview]
Message-ID: <20030223115012.A17127@infradead.org> (raw)
In-Reply-To: <20030218211940.GA1048@elf.ucw.cz>; from pavel@ucw.cz on Tue, Feb 18, 2003 at 10:19:40PM +0100
On Tue, Feb 18, 2003 at 10:19:40PM +0100, Pavel Machek wrote:
> + /*
> + * Fix for Toshiba Satellites. Toshiba's like to repeat
> + * "key down" event for A in combinations like shift-A.
> + * Thanx to Andrei Pitis <pink@roedu.net>.
> + */
> + static int prev_scancode = 0;
> + static int stop_jiffies = 0;
> +
> + /* new scancode, trigger delay */
> + if (keycode != prev_scancode) stop_jiffies = jiffies;
> + else if (jiffies - stop_jiffies >= 10) stop_jiffies = 0;
> + else {
> + printk( "Keyboard glitch detected, ignoring keypress\n" );
> + return;
> + }
> + prev_scancode = keycode;
> +
That codingstyle is not acceptable. Please reformat to match
Documentation/CodingStyle. Also there are macros for jiffie overflow
handling you might want to use, see include/linux/jiffies.h
next prev parent reply other threads:[~2003-02-23 11:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-18 21:19 Toshiba keyboard workaroun Pavel Machek
2003-02-23 8:19 ` Vojtech Pavlik
2003-02-23 11:29 ` Pavel Machek
2003-02-23 11:50 ` Christoph Hellwig [this message]
[not found] <mailman.1045603384.24857.linux-kernel2news@redhat.com>
2003-02-18 22:13 ` Pete Zaitcev
2003-02-18 22:21 ` Pavel Machek
2003-02-18 22:24 ` Pavel Machek
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=20030223115012.A17127@infradead.org \
--to=hch@infradead.org \
--cc=alan@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
/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