Thread (11 messages) 11 messages, 4 authors, 2015-07-21

Re: [RFC ebeam PATCH 2/2] input: misc: New USB eBeam input driver

From: Yann Cantin <hidden>
Date: 2015-07-21 14:01:53
Also in: linux-input, lkml

Hi,

Le 21/07/2015 00:40, Greg KH a écrit :
On Mon, Jul 20, 2015 at 03:26:40PM -0700, Dmitry Torokhov wrote:
quoted
On Mon, Jul 20, 2015 at 02:59:56PM -0700, Greg KH wrote:
quoted
On Mon, Jul 20, 2015 at 11:03:19PM +0200, Yann Cantin wrote:
quoted
Signed-off-by: Yann Cantin <redacted>
quoted
+
+	/* 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
--
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help