Adding sysfs attributes to an already created device raises no userland
notification.
Instead of fiddling around in the depths of busses and devices I reuse the
event char device (module hid-roccat). This device gets now created with
a hardware specific class that contains the device attributes.
For this I had to introduce support for binary attributes into struct class.
This is afaik the easiest way to achieve said goal. If these patches get
applied I can upload a new version of my userland tools that is compatible
with old and new drivers in an instant.
As there are quite a couple of unapplied patches flying around, I decided
to base these patches on 2.6.37-rc2 and designed them to contain everything
pending and so make all unapplied patches obsolete.
On Fri, 26 Nov 2010, Stefan Achatz wrote:
> Adding sysfs attributes to an already created device raises no userland
> notification.
>
> Instead of fiddling around in the depths of busses and devices I reuse the
> event char device (module hid-roccat). This device gets now created with
> a hardware specific class that contains the device attributes.
Hi Stefan,
I have applied the series, and removed the #pragma pack ugliness. Thanks,
--
Jiri Kosina
SUSE Labs, Novell Inc.
----- Original Nachricht ----
Von: Jiri Kosina <[email protected]>
An: Stefan Achatz <[email protected]>
Datum: 09.12.2010 14:30
Betreff: Re: [PATCH 0/5] HID: roccat: Achieve userspace notification on sysfs
attribute creation
> On Fri, 26 Nov 2010, Stefan Achatz wrote:
>
> > Adding sysfs attributes to an already created device raises no userland
> > notification.
> >
> > Instead of fiddling around in the depths of busses and devices I reuse
> the
> > event char device (module hid-roccat). This device gets now created with
> > a hardware specific class that contains the device attributes.
>
> Hi Stefan,
>
> I have applied the series, and removed the #pragma pack ugliness. Thanks,
Hello Jiri,
Using my patch replacing the #pragma pack with the __packed macro would have saved you some time:
https://lkml.org/lkml/2010/11/27/14
Just for the future: Whats better using the verbose version __attribute__ ((__packed__)) or the macro
__packed as I did?
Thanks, Stefan
On Thu, 9 Dec 2010, Stefan Achatz wrote:
> > I have applied the series, and removed the #pragma pack ugliness. Thanks,
>
> Hello Jiri,
> Using my patch replacing the #pragma pack with the __packed macro would
> have saved you some time: https://lkml.org/lkml/2010/11/27/14
Ah, missed that. Never mind.
> Just for the future: Whats better using the verbose version
> __attribute__ ((__packed__)) or the macro __packed as I did?
I don't think I really care deeply here.
For some rationale why these shortcuts exist, please see commit
82ddcb0405704.
--
Jiri Kosina
SUSE Labs, Novell Inc.