On Jul 10 2014 or thereabouts, Jason Gerecke wrote:
> On Wed, Jul 9, 2014 at 8:12 AM, Benjamin Tissoires
> <benjamin.tissoi...@redhat.com> wrote:
> > Since kernel commit bbe3175408cde792fbaa5bd1e41e430ea9e4fb4f
> > (HID: input: fix input sysfs path for hid devices) available since v3.14,
> > Bluetooth input devices are registered on top of the HID parent, not
> > the Bluetooth one.
> > That means that libwacom currently consider their transport bus as hid,
> > instead of bluetooth or usb. And as a result, bluetooth devices are ignored
> > by libwacom.
> >
> > This change is also required for USB if the path is taken to switch from
> > a plain USB driver to a HID one 
> > (https://patchwork.kernel.org/patch/4454631/)
> >
> > Signed-off-by: Benjamin Tissoires <benjamin.tissoi...@redhat.com>
> > ---
> >  libwacom/libwacom.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/libwacom/libwacom.c b/libwacom/libwacom.c
> > index 574e6f3..ad93f57 100644
> > --- a/libwacom/libwacom.c
> > +++ b/libwacom/libwacom.c
> > @@ -102,7 +102,8 @@ get_bus (GUdevDevice *device)
> >         subsystem = g_udev_device_get_subsystem (device);
> >         parent = g_object_ref (device);
> >
> > -       while (parent && g_strcmp0 (subsystem, "input") == 0) {
> > +       while (parent && (g_strcmp0 (subsystem, "input") == 0) ||
> > +                        (g_strcmp0 (subsystem, "hid") == 0) ){
> 
> Shouldn't parens be added around the two string comparisons? IIRC,
> "&&" takes precedence over "||" so the loop still may be entered even
> if parent is null.

You are right. Thanks!

Resending a v2 ASAP.

Cheers,
Benjamin

> 
> >                 GUdevDevice *old_parent = parent;
> >                 parent = g_udev_device_get_parent (old_parent);
> >                 if (parent)
> > --
> > 1.9.3
> >
> >
> > ------------------------------------------------------------------------------
> > Open source business process management suite built on Java and Eclipse
> > Turn processes into business applications with Bonita BPM Community Edition
> > Quickly connect people, data, and systems into organized workflows
> > Winner of BOSSIE, CODIE, OW2 and Gartner awards
> > http://p.sf.net/sfu/Bonitasoft
> > _______________________________________________
> > Linuxwacom-devel mailing list
> > Linuxwacom-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to