Re: [Linuxwacom-devel] [PATCH 1/6] Check ioctl return value

2012-03-21 Thread Ping Cheng
On Tue, Mar 20, 2012 at 10:46 PM, Peter Hutterer
peter.hutte...@who-t.net wrote:
 Really, this shouldn't ever fail but at least it shuts up some static
 analysers.

 Signed-off-by: Peter Hutterer peter.hutte...@who-t.net

Reviewed-by: Ping Cheng pingli...@gmail.com

for the whole set. Thank you, Peter, for cleaning up the code.

Ping

 ---
  src/wcmUSB.c |   11 +--
  1 files changed, 9 insertions(+), 2 deletions(-)

 diff --git a/src/wcmUSB.c b/src/wcmUSB.c
 index a2d30da..096943e 100644
 --- a/src/wcmUSB.c
 +++ b/src/wcmUSB.c
 @@ -1563,11 +1563,18 @@ static void usbDispatchEvents(InputInfoPtr pInfo)
        if (!ds-device_type  !dslast.proximity)
        {
                unsigned long keys[NBITS(KEY_MAX)] = { 0 };
 +               int rc;

                /* Retrieve the type by asking a resend from the kernel */
 -               ioctl(common-fd, EVIOCGKEY(sizeof(keys)), keys);
 +               rc = ioctl(common-fd, EVIOCGKEY(sizeof(keys)), keys);
 +               if (rc == -1)
 +               {
 +                       xf86Msg(X_ERROR, %s: failed to retrieve key bits\n,
 +                                       pInfo-name);
 +                       return;
 +               }

 -               for (i=0; i  ARRAY_SIZE(wcmTypeToKey); i++)
 +               for (i = 0; i  ARRAY_SIZE(wcmTypeToKey); i++)
                {
                        if (ISBITSET(keys, wcmTypeToKey[i].tool_key))
                        {
 --
 1.7.7.6


 --
 This SF email is sponsosred by:
 Try Windows Azure free for 90 days Click Here
 http://p.sf.net/sfu/sfd2d-msazure
 ___
 Linuxwacom-devel mailing list
 Linuxwacom-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


[Linuxwacom-devel] [PATCH 1/1] conf: Only match tablet Waltop devices

2012-03-21 Thread Nikolai Kondrashov
Only match Waltop event devices classified as tablets.

Advanced Waltop tablets have on-the-frame controls such as multifunction
dials (controlling scrolling, zooming, volume and keyboard navigation) and
keyboard modifier buttons. These are represented as separate event devices
and are better handled by xf86-input-evdev.

Signed-off-by: Nikolai Kondrashov spbn...@gmail.com
---
 conf/50-wacom.conf |   10 +-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/conf/50-wacom.conf b/conf/50-wacom.conf
index 5cf5fdf..febcef6 100644
--- a/conf/50-wacom.conf
+++ b/conf/50-wacom.conf
@@ -1,6 +1,6 @@
 Section InputClass
Identifier Wacom class
-   MatchProduct Wacom|WACOM|WALTOP|Hanwang|PTK-540WL
+   MatchProduct Wacom|WACOM|Hanwang|PTK-540WL
MatchDevicePath /dev/input/event*
Driver wacom
 EndSection
@@ -17,6 +17,14 @@ Section InputClass
 Driver wacom
 EndSection
 
+# Waltop tablets
+Section InputClass
+   Identifier Wacom class
+   MatchProduct WALTOP
+   MatchIsTablet on
+   MatchDevicePath /dev/input/event*
+   Driver wacom
+EndSection
 
 # N-Trig Duosense Electromagnetic Digitizer
 Section InputClass
-- 
1.7.9.1


--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] [PATCH 1/3] HID: wacom: Remove CONFIG_HID_WACOM_POWER_SUPPLY option

2012-03-21 Thread Przemo Firszt
Dnia 2012-03-19, pon o godzinie 19:08 +, Przemo Firszt pisze:
 This option was ment as a safety mechanism in case the system treats the wacom
 tablet battery as the main power supply. It's no longer required as now we can
 distinguish between system power supply and device power supply.
 
 Signed-off-by: Przemo Firszt prz...@firszt.eu
 Reviewed-by: Chris Bagwell ch...@cnpbagwell.com
 ---
Jiri,
I just noticed that there is one more CONFIG_HID_WACOM_POWER_SUPPLY in
drivers/hid/hid-wacom.c that needs to be removed. If you didn't apply it
yet I'd like to resend all 3 patches or if you alredy did it I just
submit a fix patch.
-- 
Regards,
Przemo Firszt


--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] [PATCH 1/1] conf: Only match tablet Waltop devices

2012-03-21 Thread Peter Hutterer
On Wed, Mar 21, 2012 at 10:27:22PM +0200, Nikolai Kondrashov wrote:
 Only match Waltop event devices classified as tablets.
 
 Advanced Waltop tablets have on-the-frame controls such as multifunction
 dials (controlling scrolling, zooming, volume and keyboard navigation) and
 keyboard modifier buttons. These are represented as separate event devices
 and are better handled by xf86-input-evdev.
 
 Signed-off-by: Nikolai Kondrashov spbn...@gmail.com
 ---
  conf/50-wacom.conf |   10 +-
  1 files changed, 9 insertions(+), 1 deletions(-)
 
 diff --git a/conf/50-wacom.conf b/conf/50-wacom.conf
 index 5cf5fdf..febcef6 100644
 --- a/conf/50-wacom.conf
 +++ b/conf/50-wacom.conf
 @@ -1,6 +1,6 @@
  Section InputClass
   Identifier Wacom class
 - MatchProduct Wacom|WACOM|WALTOP|Hanwang|PTK-540WL
 + MatchProduct Wacom|WACOM|Hanwang|PTK-540WL
   MatchDevicePath /dev/input/event*
   Driver wacom
  EndSection
 @@ -17,6 +17,14 @@ Section InputClass
  Driver wacom
  EndSection
  
 +# Waltop tablets
 +Section InputClass
 + Identifier Wacom class

changed this to Waltop class, applied otherwise. thanks.

Cheers,
  Peter
 + MatchProduct WALTOP
 + MatchIsTablet on
 + MatchDevicePath /dev/input/event*
 + Driver wacom
 +EndSection
  
  # N-Trig Duosense Electromagnetic Digitizer
  Section InputClass
 -- 
 1.7.9.1

--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel