From: Yann Cantin <yann.cantin-QFKgK+z4sOrR7s880joybQ@public.gmane.org>
To: Greg KH
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
Dmitry Torokhov
<dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
jkosina-AlSwsSmVLrQ@public.gmane.org
Subject: Re: [RFC ebeam PATCH 2/2] input: misc: New USB eBeam input driver
Date: Tue, 21 Jul 2015 15:54:14 +0200 [thread overview]
Message-ID: <55AE4F06.7000407@laposte.net> (raw)
In-Reply-To: <20150720224033.GA23884-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
Hi,
Le 21/07/2015 00:40, Greg KH a écrit :
> On Mon, Jul 20, 2015 at 03:26:40PM -0700, Dmitry Torokhov wrote:
>> On Mon, Jul 20, 2015 at 02:59:56PM -0700, Greg KH wrote:
>>> On Mon, Jul 20, 2015 at 11:03:19PM +0200, Yann Cantin wrote:
>>>> Signed-off-by: Yann Cantin <yann.cantin-QFKgK+z4sOrR7s880joybQ@public.gmane.org>
>>>
>>>> +
>>>> + /* sysfs setup */
>>>> + err = sysfs_create_group(&intf->dev.kobj, &ebeam_attr_group);
>>>
>>> Ick, you just added the sysfs files to the USB device, not your input
>>> device, are you sure you tested this?
>>>
>>> And there should be a race-free way to add an attribute group to an
>>> input device, as this is, you are adding them to the device _after_ it
>>> is created, so userspace will not see them at creation time, causing a
>>> race.
>>
>> No, there are no driver-specific attributed on input devices themselves,
>> they belong to the actual hardware devices. The input devices only
>> export standard attributes applicable to every and all input devices
>> in the system.
>
> Then the Documentation in this patch better be fixed up, as it points to
> the input device as having these sysfs files :)
>
> But as these are input device attributes, and not USB device interface
> attributes, putting them on the USB interface doesn't make much sense,
To sum up : these attributes are USB device's not input's, only indirectly
accessed via inputXX/device/, and they only modify the driver's behavior.
So, it make sense to correct the documentation to point at
/sys/bus/usb/drivers/ebeam/X-X:1.0/. Right ?
thanks,
--
Yann Cantin
A4FEB47F
--
next prev parent reply other threads:[~2015-07-21 13:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-20 21:03 [RFC ebeam PATCH 0/3] new USB eBeam input driver Yann Cantin
[not found] ` <1437426199-29866-1-git-send-email-yann.cantin-QFKgK+z4sOrR7s880joybQ@public.gmane.org>
2015-07-20 21:03 ` [RFC ebeam PATCH 1/2] hid: Blacklist eBeam devices Yann Cantin
2015-07-20 21:03 ` [RFC ebeam PATCH 2/2] input: misc: New USB eBeam input driver Yann Cantin
2015-07-20 21:59 ` Greg KH
2015-07-20 22:26 ` Dmitry Torokhov
2015-07-20 22:40 ` Greg KH
2015-07-20 23:09 ` Dmitry Torokhov
[not found] ` <20150720224033.GA23884-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2015-07-21 13:54 ` Yann Cantin [this message]
[not found] ` <20150720215956.GA21796-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2015-07-21 12:18 ` Yann Cantin
[not found] ` <1437426199-29866-3-git-send-email-yann.cantin-QFKgK+z4sOrR7s880joybQ@public.gmane.org>
2015-07-21 8:19 ` Oliver Neukum
2015-07-21 12:38 ` Yann Cantin
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=55AE4F06.7000407@laposte.net \
--to=yann.cantin-qfkgk+z4sorr7s880joybq@public.gmane.org \
--cc=dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=jkosina-AlSwsSmVLrQ@public.gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.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).