From: "Christer Nilsson" <christer.nilsson@kretskompaniet.se>
To: "Greg KH" <greg@kroah.com>
Cc: <lepied@xfree86.org>, "Linux-Kernel" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] 2.4.19-pre8 Fix for Intuos tablet in wacom.c
Date: Wed, 15 May 2002 10:54:18 +0200 [thread overview]
Message-ID: <IBEJLIFNGHPKEKCKODPDIEFFDPAA.christer.nilsson@kretskompaniet.se> (raw)
In-Reply-To: <20020515024646.GA21582@kroah.com>
[-- Attachment #1: Type: text/plain, Size: 1189 bytes --]
Yes, when you removed the smoothing algorithm you forgot to make
the change my previous patch fixed. Anyway, I took a look at the code
and found that it could be cleaned up a little.
This patch works for me, but I can only test it with an Intuos tablet
although it should not break anything.
Christer Nilsson
> -----Original Message-----
> From: Greg KH [mailto:greg@kroah.com]
> Sent: Wednesday, May 15, 2002 4:47 AM
> To: Christer Nilsson
> Cc: lepied@xfree86.org; Linux-Kernel
> Subject: Re: [PATCH] 2.4.19-pre8 Fix for Intuos tablet in wacom.c
>
>
> On Tue, May 14, 2002 at 08:56:14PM +0200, Christer Nilsson wrote:
> > Hi Frederic.
> >
> > Can you take a look at this?
> >
> > I've looked at the code at
> > http://people.mandrakesoft.com/~flepied/projects/wacom/ and found that
> > there's a couple of lines missing in the kernel driver. It seems that a
> > smoothing algorithm is left out
> > in the kernel source. My patch just circumvents that.
>
> I took out the smoothing algorithm, as it does not belong in the kernel.
> That kind of stuff (filters, etc.) belongs in userspace.
>
> Did my removing it break the current driver accidentally?
>
> thanks,
>
> greg k-h
>
[-- Attachment #2: wacom.diff --]
[-- Type: application/octet-stream, Size: 1572 bytes --]
--- /usr/src/linux-2.4.19-pre8-ac2/drivers/usb/wacom.c.org Wed May 15 10:28:42 2002
+++ /usr/src/linux-2.4.19-pre8-ac2/drivers/usb/wacom.c Wed May 15 10:32:18 2002
@@ -111,7 +111,6 @@
struct wacom_features *features;
int tool[2];
int open;
- int x, y;
__u32 serial[2];
};
@@ -209,16 +208,16 @@
input_report_abs(dev, ABS_DISTANCE, data[7]);
input_report_rel(dev, REL_WHEEL, (signed char) data[6]);
- input_report_abs(dev, ABS_X, wacom->x = x);
- input_report_abs(dev, ABS_Y, wacom->y = y);
+ input_report_abs(dev, ABS_X, x);
+ input_report_abs(dev, ABS_Y, y);
input_event(dev, EV_MSC, MSC_SERIAL, data[1] & 0x01);
return;
}
if (data[1] & 0x80) {
- input_report_abs(dev, ABS_X, wacom->x = x);
- input_report_abs(dev, ABS_Y, wacom->y = y);
+ input_report_abs(dev, ABS_X, x);
+ input_report_abs(dev, ABS_Y, y);
}
input_report_abs(dev, ABS_PRESSURE, data[6] | ((__u32)data[7] << 8));
@@ -236,7 +235,6 @@
struct input_dev *dev = &wacom->dev;
unsigned int t;
int idx;
- int x, y;
if (urb->status) return;
@@ -285,11 +283,8 @@
return;
}
- x = ((__u32)data[2] << 8) | data[3];
- y = ((__u32)data[4] << 8) | data[5];
-
- input_report_abs(dev, ABS_X, wacom->x);
- input_report_abs(dev, ABS_Y, wacom->y);
+ input_report_abs(dev, ABS_X, ((__u32)data[2] << 8) | data[3]);
+ input_report_abs(dev, ABS_Y, ((__u32)data[4] << 8) | data[5]);
input_report_abs(dev, ABS_DISTANCE, data[9] >> 4);
if ((data[1] & 0xb8) == 0xa0) { /* general pen packet */
next prev parent reply other threads:[~2002-05-15 8:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-14 8:31 [PATCH] 2.4.19-pre8 Fix for Intuos tablet in wacom.c Christer Nilsson
2002-05-14 15:37 ` Greg KH
2002-05-14 18:56 ` Christer Nilsson
2002-05-15 2:46 ` Greg KH
2002-05-15 8:54 ` Christer Nilsson [this message]
2002-05-16 22:52 ` Greg KH
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=IBEJLIFNGHPKEKCKODPDIEFFDPAA.christer.nilsson@kretskompaniet.se \
--to=christer.nilsson@kretskompaniet.se \
--cc=greg@kroah.com \
--cc=lepied@xfree86.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;
as well as URLs for NNTP newsgroup(s).