From 68513a4c5fe68938350cf2c56d97946e49f014e1 Mon Sep 17 00:00:00 2001 From: Chris Bagwell Date: Wed, 8 Feb 2012 23:08:48 -0800 Subject: Input: wacom - add missing LEDS_CLASS to Kconfig Signed-off-by: Chris Bagwell Signed-off-by: Dmitry Torokhov --- drivers/input/tablet/Kconfig | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/input/tablet') diff --git a/drivers/input/tablet/Kconfig b/drivers/input/tablet/Kconfig index 58a8775..e53f408 100644 --- a/drivers/input/tablet/Kconfig +++ b/drivers/input/tablet/Kconfig @@ -77,6 +77,8 @@ config TABLET_USB_WACOM tristate "Wacom Intuos/Graphire tablet support (USB)" depends on USB_ARCH_HAS_HCD select USB + select NEW_LEDS + select LEDS_CLASS help Say Y here if you want to use the USB version of the Wacom Intuos or Graphire tablet. Make sure to say Y to "Mouse support" -- cgit v1.1 From 19d57d3a145e94349abf805eed2316ef720d86c2 Mon Sep 17 00:00:00 2001 From: Jason Gerecke Date: Tue, 6 Mar 2012 10:19:19 -0800 Subject: Input: wacom - fix 3rd-gen Bamboo MT when 4+ fingers are in use The message count field uses three bits of storage, not two. Signed-off-by: Jason Gerecke Acked-by: Chris Bagwell Signed-off-by: Dmitry Torokhov --- drivers/input/tablet/wacom_wac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input/tablet') diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index 88672ec..cd3ed29 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c @@ -926,7 +926,7 @@ static int wacom_bpt3_touch(struct wacom_wac *wacom) { struct input_dev *input = wacom->input; unsigned char *data = wacom->data; - int count = data[1] & 0x03; + int count = data[1] & 0x07; int i; if (data[0] != 0x02) -- cgit v1.1 From 24e3e5ae1e4c2a3a32f5b1f96b4e3fd721806acd Mon Sep 17 00:00:00 2001 From: Jason Gerecke Date: Mon, 12 Mar 2012 22:15:43 -0700 Subject: Input: wacom - fix physical size calculation for 3rd-gen Bamboo This calculation determines the physical dimensions of the tablet, used later on in calculate_touch_res to obtain the touch sensor resolution. Instead of dividing the logical size by the resolution, the current code performs a multiplication. This doesn't pose a problem for the 3rd-gen Bamboo since the resolution and scale factor happen to be identical, but will produce an incorrect result for other cases. Signed-off-by: Jason Gerecke Reviewed-by: Chris Bagwell Signed-off-by: Dmitry Torokhov --- drivers/input/tablet/wacom_sys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/input/tablet') diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index 7e63183..b590589 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c @@ -184,9 +184,9 @@ static int wacom_parse_logical_collection(unsigned char *report, * data before its overwritten. */ features->x_phy = - (features->x_max * features->x_resolution) / 100; + (features->x_max * 100) / features->x_resolution; features->y_phy = - (features->y_max * features->y_resolution) / 100; + (features->y_max * 100) / features->y_resolution; features->x_max = features->y_max = get_unaligned_le16(&report[10]); -- cgit v1.1 From f182394033d639679264d61e6dca62761e659ff7 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 29 Mar 2012 22:38:11 -0700 Subject: Input: wacom - check for allocation failure in probe() We accidentally removed the check for NULL in 3aac0ef10b "Input: wacom - isolate input registration". Signed-off-by: Dan Carpenter Reviewed-by: Chris Bagwell Signed-off-by: Dmitry Torokhov --- drivers/input/tablet/wacom_sys.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/input/tablet') diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index 19ba586..0d26921 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c @@ -1002,6 +1002,8 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i return -EINVAL; wacom = kzalloc(sizeof(struct wacom), GFP_KERNEL); + if (!wacom) + return -ENOMEM; wacom_wac = &wacom->wacom_wac; wacom_wac->features = *((struct wacom_features *)id->driver_info); -- cgit v1.1