On Mon, Jul 26, 2010 at 11:40:25PM -0700, Ping Cheng wrote:
> Serial number is stored as wcmLastToolSerial in common. No need to
> explicitly introduce it to usbChooseChannel as an input.
> 
> Signed-off-by: Ping Cheng <[email protected]>

merged, thanks.

Cheers,
  Peter

> ---
>  src/wcmUSB.c |    7 ++++---
>  1 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/src/wcmUSB.c b/src/wcmUSB.c
> index 169ad26..052b777 100644
> --- a/src/wcmUSB.c
> +++ b/src/wcmUSB.c
> @@ -53,7 +53,7 @@ static int usbDetectConfig(LocalDevicePtr local);
>  static void usbParseEvent(LocalDevicePtr local,
>       const struct input_event* event);
>  static void usbParseChannel(LocalDevicePtr local, int channel);
> -static int usbChooseChannel(WacomCommonPtr common, int serial);
> +static int usbChooseChannel(WacomCommonPtr common);
>  
>       WacomDeviceClass gWacomUSBDevice =
>       {
> @@ -718,10 +718,11 @@ static int usbParse(LocalDevicePtr local, const 
> unsigned char* data, int len)
>       return common->wcmPktLength;
>  }
>  
> -static int usbChooseChannel(WacomCommonPtr common, int serial)
> +static int usbChooseChannel(WacomCommonPtr common)
>  {
>       /* figure out the channel to use based on serial number */
>       int i, channel = -1;
> +     int serial = common->wcmLastToolSerial;
>  
>       if (common->wcmProtocolLevel == 4)
>       {
> @@ -877,7 +878,7 @@ static void usbParseEvent(LocalDevicePtr local,
>               goto skipEvent;
>       }
>  
> -     channel = usbChooseChannel(common, common->wcmLastToolSerial);
> +     channel = usbChooseChannel(common);
>  
>       /* couldn't decide channel? invalid data */
>       if (channel == -1) goto skipEvent;
> -- 
> 1.7.1.1
> 

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share 
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to