On Thu, Apr 14, 2011 at 05:06:11PM -0700, Ping Cheng wrote:
> The resolution table has been added to the kernel driver. Let's use
> it when we can.
> 
> Signed-off-by: Ping Cheng <[email protected]>
> ---
> Changes to v1: assign absinfo.resolution to wcmResolX instead of letting
> it fall to the WacomModelDesc table.
>  src/wcmUSB.c |   22 ++++++++++++++++++++--
>  1 files changed, 20 insertions(+), 2 deletions(-)
> 
> diff --git a/src/wcmUSB.c b/src/wcmUSB.c
> index 61e268e..e1d8381 100644
> --- a/src/wcmUSB.c
> +++ b/src/wcmUSB.c
> @@ -485,14 +485,23 @@ int usbWcmGetRanges(InputInfoPtr pInfo)
>                       pInfo->name, absinfo.maximum);
>               return !Success;
>       }
> +
>       if (!is_touch)
> +     {
>               common->wcmMaxX = absinfo.maximum;
> +
> +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30)
> +             if (absinfo.resolution > 0)
> +                     common->wcmResolX = absinfo.resolution * 1000;
> +#endif
> +     }
>       else
>       {
>               common->wcmMaxTouchX = absinfo.maximum;
>  
>  #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30)
> -             common->wcmTouchResolX = absinfo.resolution * 1000;
> +             if (absinfo.resolution > 0)
> +                     common->wcmTouchResolX = absinfo.resolution * 1000;
>  #endif
>       }
>  
> @@ -509,14 +518,23 @@ int usbWcmGetRanges(InputInfoPtr pInfo)
>                       pInfo->name, absinfo.maximum);
>               return !Success;
>       }
> +
>       if (!is_touch)
> +     {
>               common->wcmMaxY = absinfo.maximum;
> +
> +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30)
> +             if (absinfo.resolution > 0)
> +                     common->wcmResolY = absinfo.resolution * 1000;
> +#endif
> +     }
>       else
>       {
>               common->wcmMaxTouchY = absinfo.maximum;
>  
>  #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30)
> -             common->wcmTouchResolY = absinfo.resolution * 1000;
> +             if (absinfo.resolution > 0)
> +                     common->wcmTouchResolY = absinfo.resolution * 1000;
>  #endif
>       }
>  
> -- 
> 1.7.4.2

merged into -next, thanks.


Cheers,
  Peter

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to