From: Dmitry Torokhov <dtor_core@ameritech.net>
To: Stephen Evanchik <evanchsa@gmail.com>
Cc: Vojtech Pavlik <vojtech@suse.cz>, linux-kernel@vger.kernel.org
Subject: Re: PATCH 2.6.11-rc4]: IBM TrackPoint configuration support
Date: Wed, 16 Feb 2005 00:20:21 -0500 [thread overview]
Message-ID: <200502160020.21638.dtor_core@ameritech.net> (raw)
In-Reply-To: <a71293c205021520134f75ea3c@mail.gmail.com>
Hi,
sorry, couple of more things (and I promise I will shut up ;))
> /*
> + * Try to initialize the IBM TrackPoint
> + */
> + if (max_proto > PSMOUSE_PS2 && trackpoint_init(psmouse) == 0) {
> + psmouse->vendor = "IBM";
> + psmouse->name = "TrackPoint";
> +
> + return PSMOUSE_PS2;
> + }
I would like you to change the code so that psmouse structure only
changed when set_properties is set. Probably moving these into
trackpoint_init is a good idea since _init should not override
psmouse->private unless told to do so. It is important when the device
was not identified as a trackpoint but later (let's say after resume)
it is - in this case generic reconnect will cause psmouse_extensions
with set_properties = 0 to verify protocol and we dont' want to change
anything in psmouse to give the original disconnect handler change to
clean up properly.
Thinking about it some more I am pretty sure that you need a special
protocol number for the trackpoint, because protocol number is used
by psmouse_reconnect to check whether reconnect can be done or rescan
is needed. You can reuse the standard protocol handler, but you need
the new number. This way if trackpad was not identified as such first
time around, but is identified on reconnect psmouse-base would notice
that it is a new type of device and schedule reconnect and will proper
cleanup/initialization.
Does this make sense?
> +
> +#define MAKE_ATTR_WRITE(_item, command) \
> + static ssize_t psmouse_attr_set_##_item(struct psmouse
> *psmouse, const char *buf, size_t count) \
It looks like the patch got mangled on it's way, please check your mail
client.
> + { \
> + char *rest; \
> + unsigned long value; \
> + struct trackpoint_data *tp = psmouse->private; \
> + value = simple_strtoul(buf, &rest, 10); \
Whitespace damage (tabs vs. spaces). Also there are some trailing
whitespace. If you are using vi I find the following helpful to
highlight the problem spots:
set listchars=tab:\|-
highlight WhitespaceEOL ctermbg=red guibg=red
match WhitespaceEOL /\s\+$/
--
Dmitry
prev parent reply other threads:[~2005-02-16 5:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-14 0:32 PATCH 2.6.11-rc4]: IBM TrackPoint configuration support Stephen Evanchik
2005-02-14 1:31 ` Dmitry Torokhov
2005-02-15 14:16 ` Vojtech Pavlik
2005-02-16 4:13 ` Stephen Evanchik
2005-02-16 5:20 ` Dmitry Torokhov [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=200502160020.21638.dtor_core@ameritech.net \
--to=dtor_core@ameritech.net \
--cc=evanchsa@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vojtech@suse.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