From: David Megginson <david@megginson.com>
To: linux-kernel@vger.kernel.org
Subject: Joystick-hat fix for drivers/usb/hid-input.c
Date: Mon, 15 Oct 2001 17:41:53 -0400 [thread overview]
Message-ID: <15307.22561.583985.85494@megginson.com> (raw)
[NOTE: I'm not subscribed to linux-kernel -- if you have any
questions, please reply directly to me.]
Between 2.4.9 and 2.4.10, drivers/usb/hid.c was replaced by
drivers/usb/hid-input.c, and a small typo broke support for USB
joystick hats. Here's a patch to 2.4.12 that fixes the problem:
========================================================================
--- drivers/usb/hid-input.c.ORIG Tue Sep 25 07:01:26 2001
+++ drivers/usb/hid-input.c Mon Oct 15 17:31:27 2001
@@ -61,7 +61,7 @@
static struct {
__s32 x;
__s32 y;
-} hid_hat_to_axis[] = {{0, 0}, { 0,-1}, { 1,-1}, { 1, 0}, { 1, 1}, { 0, 1}, {-1, 1}, {-1, 0}, {-1,-1}};
+} hid_hat_to_axis[] = {{ 0,-1}, { 1,-1}, { 1, 0}, { 1, 1}, { 0, 1}, {-1, 1}, {-1, 0}, {-1,-1}, {0,0}};
static void hidinput_configure_usage(struct hid_device *device, struct hid_field *field, struct hid_usage *usage)
{
========================================================================
You'll notice that the order of the hid_hat_to_axis entries in the
patched version is the same as in the original hid.c.
All the best,
David
--
David Megginson
david@megginson.com
reply other threads:[~2001-10-15 21:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=15307.22561.583985.85494@megginson.com \
--to=david@megginson.com \
--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
all inboxes | Powered by JetHome®