aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/input.c16
-rw-r--r--drivers/input/joystick/xpad.c33
-rw-r--r--drivers/input/keyboard/gpio_keys.c13
-rw-r--r--drivers/input/keyboard/gpio_keys_polled.c13
-rw-r--r--drivers/input/keyboard/lm8323.c2
-rw-r--r--drivers/input/matrix-keymap.c3
-rw-r--r--drivers/input/mouse/sentelic.c2
-rw-r--r--drivers/input/tablet/wacom_sys.c6
-rw-r--r--drivers/input/tablet/wacom_wac.c3
9 files changed, 69 insertions, 22 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c
index ce01332f7b3a..c04469928925 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -1785,12 +1785,13 @@ static void devm_input_device_release(struct device *dev, void *res)
1785 * its driver (or binding fails). Once managed input device is allocated, 1785 * its driver (or binding fails). Once managed input device is allocated,
1786 * it is ready to be set up and registered in the same fashion as regular 1786 * it is ready to be set up and registered in the same fashion as regular
1787 * input device. There are no special devm_input_device_[un]register() 1787 * input device. There are no special devm_input_device_[un]register()
1788 * variants, regular ones work with both managed and unmanaged devices. 1788 * variants, regular ones work with both managed and unmanaged devices,
1789 * should you need them. In most cases however, managed input device need
1790 * not be explicitly unregistered or freed.
1789 * 1791 *
1790 * NOTE: the owner device is set up as parent of input device and users 1792 * NOTE: the owner device is set up as parent of input device and users
1791 * should not override it. 1793 * should not override it.
1792 */ 1794 */
1793
1794struct input_dev *devm_input_allocate_device(struct device *dev) 1795struct input_dev *devm_input_allocate_device(struct device *dev)
1795{ 1796{
1796 struct input_dev *input; 1797 struct input_dev *input;
@@ -2004,6 +2005,17 @@ static void devm_input_device_unregister(struct device *dev, void *res)
2004 * Once device has been successfully registered it can be unregistered 2005 * Once device has been successfully registered it can be unregistered
2005 * with input_unregister_device(); input_free_device() should not be 2006 * with input_unregister_device(); input_free_device() should not be
2006 * called in this case. 2007 * called in this case.
2008 *
2009 * Note that this function is also used to register managed input devices
2010 * (ones allocated with devm_input_allocate_device()). Such managed input
2011 * devices need not be explicitly unregistered or freed, their tear down
2012 * is controlled by the devres infrastructure. It is also worth noting
2013 * that tear down of managed input devices is internally a 2-step process:
2014 * registered managed input device is first unregistered, but stays in
2015 * memory and can still handle input_event() calls (although events will
2016 * not be delivered anywhere). The freeing of managed input device will
2017 * happen later, when devres stack is unwound to the point where device
2018 * allocation was made.
2007 */ 2019 */
2008int input_register_device(struct input_dev *dev) 2020int input_register_device(struct input_dev *dev)
2009{ 2021{
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index 83811e45d633..d6cbfe9df218 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -118,11 +118,12 @@ static const struct xpad_device {
118 u8 xtype; 118 u8 xtype;
119} xpad_device[] = { 119} xpad_device[] = {
120 { 0x045e, 0x0202, "Microsoft X-Box pad v1 (US)", 0, XTYPE_XBOX }, 120 { 0x045e, 0x0202, "Microsoft X-Box pad v1 (US)", 0, XTYPE_XBOX },
121 { 0x045e, 0x0289, "Microsoft X-Box pad v2 (US)", 0, XTYPE_XBOX },
122 { 0x045e, 0x0285, "Microsoft X-Box pad (Japan)", 0, XTYPE_XBOX }, 121 { 0x045e, 0x0285, "Microsoft X-Box pad (Japan)", 0, XTYPE_XBOX },
123 { 0x045e, 0x0287, "Microsoft Xbox Controller S", 0, XTYPE_XBOX }, 122 { 0x045e, 0x0287, "Microsoft Xbox Controller S", 0, XTYPE_XBOX },
123 { 0x045e, 0x0289, "Microsoft X-Box pad v2 (US)", 0, XTYPE_XBOX },
124 { 0x045e, 0x028e, "Microsoft X-Box 360 pad", 0, XTYPE_XBOX360 },
125 { 0x045e, 0x0291, "Xbox 360 Wireless Receiver (XBOX)", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360W },
124 { 0x045e, 0x0719, "Xbox 360 Wireless Receiver", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360W }, 126 { 0x045e, 0x0719, "Xbox 360 Wireless Receiver", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360W },
125 { 0x0c12, 0x8809, "RedOctane Xbox Dance Pad", DANCEPAD_MAP_CONFIG, XTYPE_XBOX },
126 { 0x044f, 0x0f07, "Thrustmaster, Inc. Controller", 0, XTYPE_XBOX }, 127 { 0x044f, 0x0f07, "Thrustmaster, Inc. Controller", 0, XTYPE_XBOX },
127 { 0x046d, 0xc242, "Logitech Chillstream Controller", 0, XTYPE_XBOX360 }, 128 { 0x046d, 0xc242, "Logitech Chillstream Controller", 0, XTYPE_XBOX360 },
128 { 0x046d, 0xca84, "Logitech Xbox Cordless Controller", 0, XTYPE_XBOX }, 129 { 0x046d, 0xca84, "Logitech Xbox Cordless Controller", 0, XTYPE_XBOX },
@@ -136,9 +137,12 @@ static const struct xpad_device {
136 { 0x0738, 0x4540, "Mad Catz Beat Pad", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX }, 137 { 0x0738, 0x4540, "Mad Catz Beat Pad", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX },
137 { 0x0738, 0x4556, "Mad Catz Lynx Wireless Controller", 0, XTYPE_XBOX }, 138 { 0x0738, 0x4556, "Mad Catz Lynx Wireless Controller", 0, XTYPE_XBOX },
138 { 0x0738, 0x4716, "Mad Catz Wired Xbox 360 Controller", 0, XTYPE_XBOX360 }, 139 { 0x0738, 0x4716, "Mad Catz Wired Xbox 360 Controller", 0, XTYPE_XBOX360 },
140 { 0x0738, 0x4728, "Mad Catz Street Fighter IV FightPad", XTYPE_XBOX360 },
139 { 0x0738, 0x4738, "Mad Catz Wired Xbox 360 Controller (SFIV)", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 }, 141 { 0x0738, 0x4738, "Mad Catz Wired Xbox 360 Controller (SFIV)", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 },
140 { 0x0738, 0x6040, "Mad Catz Beat Pad Pro", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX }, 142 { 0x0738, 0x6040, "Mad Catz Beat Pad Pro", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX },
143 { 0x0738, 0xbeef, "Mad Catz JOYTECH NEO SE Advanced GamePad", XTYPE_XBOX360 },
141 { 0x0c12, 0x8802, "Zeroplus Xbox Controller", 0, XTYPE_XBOX }, 144 { 0x0c12, 0x8802, "Zeroplus Xbox Controller", 0, XTYPE_XBOX },
145 { 0x0c12, 0x8809, "RedOctane Xbox Dance Pad", DANCEPAD_MAP_CONFIG, XTYPE_XBOX },
142 { 0x0c12, 0x880a, "Pelican Eclipse PL-2023", 0, XTYPE_XBOX }, 146 { 0x0c12, 0x880a, "Pelican Eclipse PL-2023", 0, XTYPE_XBOX },
143 { 0x0c12, 0x8810, "Zeroplus Xbox Controller", 0, XTYPE_XBOX }, 147 { 0x0c12, 0x8810, "Zeroplus Xbox Controller", 0, XTYPE_XBOX },
144 { 0x0c12, 0x9902, "HAMA VibraX - *FAULTY HARDWARE*", 0, XTYPE_XBOX }, 148 { 0x0c12, 0x9902, "HAMA VibraX - *FAULTY HARDWARE*", 0, XTYPE_XBOX },
@@ -148,24 +152,28 @@ static const struct xpad_device {
148 { 0x0e6f, 0x0003, "Logic3 Freebird wireless Controller", 0, XTYPE_XBOX }, 152 { 0x0e6f, 0x0003, "Logic3 Freebird wireless Controller", 0, XTYPE_XBOX },
149 { 0x0e6f, 0x0005, "Eclipse wireless Controller", 0, XTYPE_XBOX }, 153 { 0x0e6f, 0x0005, "Eclipse wireless Controller", 0, XTYPE_XBOX },
150 { 0x0e6f, 0x0006, "Edge wireless Controller", 0, XTYPE_XBOX }, 154 { 0x0e6f, 0x0006, "Edge wireless Controller", 0, XTYPE_XBOX },
151 { 0x0e6f, 0x0006, "Pelican 'TSZ' Wired Xbox 360 Controller", 0, XTYPE_XBOX360 }, 155 { 0x0e6f, 0x0105, "HSM3 Xbox360 dancepad", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 },
152 { 0x0e6f, 0x0201, "Pelican PL-3601 'TSZ' Wired Xbox 360 Controller", 0, XTYPE_XBOX360 }, 156 { 0x0e6f, 0x0201, "Pelican PL-3601 'TSZ' Wired Xbox 360 Controller", 0, XTYPE_XBOX360 },
157 { 0x0e6f, 0x0213, "Afterglow Gamepad for Xbox 360", 0, XTYPE_XBOX360 },
153 { 0x0e8f, 0x0201, "SmartJoy Frag Xpad/PS2 adaptor", 0, XTYPE_XBOX }, 158 { 0x0e8f, 0x0201, "SmartJoy Frag Xpad/PS2 adaptor", 0, XTYPE_XBOX },
159 { 0x0f0d, 0x000d, "Hori Fighting Stick EX2", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 },
160 { 0x0f0d, 0x0016, "Hori Real Arcade Pro.EX", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 },
154 { 0x0f30, 0x0202, "Joytech Advanced Controller", 0, XTYPE_XBOX }, 161 { 0x0f30, 0x0202, "Joytech Advanced Controller", 0, XTYPE_XBOX },
155 { 0x0f30, 0x8888, "BigBen XBMiniPad Controller", 0, XTYPE_XBOX }, 162 { 0x0f30, 0x8888, "BigBen XBMiniPad Controller", 0, XTYPE_XBOX },
156 { 0x102c, 0xff0c, "Joytech Wireless Advanced Controller", 0, XTYPE_XBOX }, 163 { 0x102c, 0xff0c, "Joytech Wireless Advanced Controller", 0, XTYPE_XBOX },
157 { 0x12ab, 0x8809, "Xbox DDR dancepad", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX },
158 { 0x12ab, 0x0004, "Honey Bee Xbox360 dancepad", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 }, 164 { 0x12ab, 0x0004, "Honey Bee Xbox360 dancepad", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 },
159 { 0x0e6f, 0x0105, "HSM3 Xbox360 dancepad", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 }, 165 { 0x12ab, 0x8809, "Xbox DDR dancepad", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX },
160 { 0x1430, 0x4748, "RedOctane Guitar Hero X-plorer", 0, XTYPE_XBOX360 }, 166 { 0x1430, 0x4748, "RedOctane Guitar Hero X-plorer", 0, XTYPE_XBOX360 },
161 { 0x1430, 0x8888, "TX6500+ Dance Pad (first generation)", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX }, 167 { 0x1430, 0x8888, "TX6500+ Dance Pad (first generation)", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX },
162 { 0x146b, 0x0601, "BigBen Interactive XBOX 360 Controller", 0, XTYPE_XBOX360 }, 168 { 0x146b, 0x0601, "BigBen Interactive XBOX 360 Controller", 0, XTYPE_XBOX360 },
163 { 0x045e, 0x028e, "Microsoft X-Box 360 pad", 0, XTYPE_XBOX360 }, 169 { 0x1689, 0xfd00, "Razer Onza Tournament Edition", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 },
164 { 0x1bad, 0x0002, "Harmonix Rock Band Guitar", 0, XTYPE_XBOX360 }, 170 { 0x1bad, 0x0002, "Harmonix Rock Band Guitar", 0, XTYPE_XBOX360 },
165 { 0x1bad, 0x0003, "Harmonix Rock Band Drumkit", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 }, 171 { 0x1bad, 0x0003, "Harmonix Rock Band Drumkit", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 },
166 { 0x0f0d, 0x0016, "Hori Real Arcade Pro.EX", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 }, 172 { 0x1bad, 0xf016, "Mad Catz Xbox 360 Controller", 0, XTYPE_XBOX360 },
167 { 0x0f0d, 0x000d, "Hori Fighting Stick EX2", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 }, 173 { 0x1bad, 0xf028, "Street Fighter IV FightPad", 0, XTYPE_XBOX360 },
168 { 0x1689, 0xfd00, "Razer Onza Tournament Edition", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 }, 174 { 0x1bad, 0xf901, "Gamestop Xbox 360 Controller", 0, XTYPE_XBOX360 },
175 { 0x1bad, 0xf903, "Tron Xbox 360 controller", 0, XTYPE_XBOX360 },
176 { 0x24c6, 0x5300, "PowerA MINI PROEX Controller", 0, XTYPE_XBOX360 },
169 { 0xffff, 0xffff, "Chinese-made Xbox Controller", 0, XTYPE_XBOX }, 177 { 0xffff, 0xffff, "Chinese-made Xbox Controller", 0, XTYPE_XBOX },
170 { 0x0000, 0x0000, "Generic X-Box pad", 0, XTYPE_UNKNOWN } 178 { 0x0000, 0x0000, "Generic X-Box pad", 0, XTYPE_UNKNOWN }
171}; 179};
@@ -235,7 +243,7 @@ static const signed short xpad_abs_triggers[] = {
235 { XPAD_XBOX360_VENDOR_PROTOCOL(vend,1) }, \ 243 { XPAD_XBOX360_VENDOR_PROTOCOL(vend,1) }, \
236 { XPAD_XBOX360_VENDOR_PROTOCOL(vend,129) } 244 { XPAD_XBOX360_VENDOR_PROTOCOL(vend,129) }
237 245
238static struct usb_device_id xpad_table [] = { 246static struct usb_device_id xpad_table[] = {
239 { USB_INTERFACE_INFO('X', 'B', 0) }, /* X-Box USB-IF not approved class */ 247 { USB_INTERFACE_INFO('X', 'B', 0) }, /* X-Box USB-IF not approved class */
240 XPAD_XBOX360_VENDOR(0x045e), /* Microsoft X-Box 360 controllers */ 248 XPAD_XBOX360_VENDOR(0x045e), /* Microsoft X-Box 360 controllers */
241 XPAD_XBOX360_VENDOR(0x046d), /* Logitech X-Box 360 style controllers */ 249 XPAD_XBOX360_VENDOR(0x046d), /* Logitech X-Box 360 style controllers */
@@ -248,10 +256,11 @@ static struct usb_device_id xpad_table [] = {
248 XPAD_XBOX360_VENDOR(0x1bad), /* Harminix Rock Band Guitar and Drums */ 256 XPAD_XBOX360_VENDOR(0x1bad), /* Harminix Rock Band Guitar and Drums */
249 XPAD_XBOX360_VENDOR(0x0f0d), /* Hori Controllers */ 257 XPAD_XBOX360_VENDOR(0x0f0d), /* Hori Controllers */
250 XPAD_XBOX360_VENDOR(0x1689), /* Razer Onza */ 258 XPAD_XBOX360_VENDOR(0x1689), /* Razer Onza */
259 XPAD_XBOX360_VENDOR(0x24c6), /* PowerA Controllers */
251 { } 260 { }
252}; 261};
253 262
254MODULE_DEVICE_TABLE (usb, xpad_table); 263MODULE_DEVICE_TABLE(usb, xpad_table);
255 264
256struct usb_xpad { 265struct usb_xpad {
257 struct input_dev *dev; /* input device interface */ 266 struct input_dev *dev; /* input device interface */
@@ -783,7 +792,7 @@ static int xpad_open(struct input_dev *dev)
783 struct usb_xpad *xpad = input_get_drvdata(dev); 792 struct usb_xpad *xpad = input_get_drvdata(dev);
784 793
785 /* URB was submitted in probe */ 794 /* URB was submitted in probe */
786 if(xpad->xtype == XTYPE_XBOX360W) 795 if (xpad->xtype == XTYPE_XBOX360W)
787 return 0; 796 return 0;
788 797
789 xpad->irq_in->dev = xpad->udev; 798 xpad->irq_in->dev = xpad->udev;
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
index d327f5a2bb0e..b29ca651a395 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -602,6 +602,7 @@ gpio_keys_get_devtree_pdata(struct device *dev)
602 602
603 i = 0; 603 i = 0;
604 for_each_child_of_node(node, pp) { 604 for_each_child_of_node(node, pp) {
605 int gpio;
605 enum of_gpio_flags flags; 606 enum of_gpio_flags flags;
606 607
607 if (!of_find_property(pp, "gpios", NULL)) { 608 if (!of_find_property(pp, "gpios", NULL)) {
@@ -610,9 +611,19 @@ gpio_keys_get_devtree_pdata(struct device *dev)
610 continue; 611 continue;
611 } 612 }
612 613
614 gpio = of_get_gpio_flags(pp, 0, &flags);
615 if (gpio < 0) {
616 error = gpio;
617 if (error != -EPROBE_DEFER)
618 dev_err(dev,
619 "Failed to get gpio flags, error: %d\n",
620 error);
621 goto err_free_pdata;
622 }
623
613 button = &pdata->buttons[i++]; 624 button = &pdata->buttons[i++];
614 625
615 button->gpio = of_get_gpio_flags(pp, 0, &flags); 626 button->gpio = gpio;
616 button->active_low = flags & OF_GPIO_ACTIVE_LOW; 627 button->active_low = flags & OF_GPIO_ACTIVE_LOW;
617 628
618 if (of_property_read_u32(pp, "linux,code", &button->code)) { 629 if (of_property_read_u32(pp, "linux,code", &button->code)) {
diff --git a/drivers/input/keyboard/gpio_keys_polled.c b/drivers/input/keyboard/gpio_keys_polled.c
index f686fd970553..21147164874d 100644
--- a/drivers/input/keyboard/gpio_keys_polled.c
+++ b/drivers/input/keyboard/gpio_keys_polled.c
@@ -135,6 +135,7 @@ static struct gpio_keys_platform_data *gpio_keys_polled_get_devtree_pdata(struct
135 135
136 i = 0; 136 i = 0;
137 for_each_child_of_node(node, pp) { 137 for_each_child_of_node(node, pp) {
138 int gpio;
138 enum of_gpio_flags flags; 139 enum of_gpio_flags flags;
139 140
140 if (!of_find_property(pp, "gpios", NULL)) { 141 if (!of_find_property(pp, "gpios", NULL)) {
@@ -143,9 +144,19 @@ static struct gpio_keys_platform_data *gpio_keys_polled_get_devtree_pdata(struct
143 continue; 144 continue;
144 } 145 }
145 146
147 gpio = of_get_gpio_flags(pp, 0, &flags);
148 if (gpio < 0) {
149 error = gpio;
150 if (error != -EPROBE_DEFER)
151 dev_err(dev,
152 "Failed to get gpio flags, error: %d\n",
153 error);
154 goto err_free_pdata;
155 }
156
146 button = &pdata->buttons[i++]; 157 button = &pdata->buttons[i++];
147 158
148 button->gpio = of_get_gpio_flags(pp, 0, &flags); 159 button->gpio = gpio;
149 button->active_low = flags & OF_GPIO_ACTIVE_LOW; 160 button->active_low = flags & OF_GPIO_ACTIVE_LOW;
150 161
151 if (of_property_read_u32(pp, "linux,code", &button->code)) { 162 if (of_property_read_u32(pp, "linux,code", &button->code)) {
diff --git a/drivers/input/keyboard/lm8323.c b/drivers/input/keyboard/lm8323.c
index 93c812662134..0de23f41b2d3 100644
--- a/drivers/input/keyboard/lm8323.c
+++ b/drivers/input/keyboard/lm8323.c
@@ -398,7 +398,7 @@ static irqreturn_t lm8323_irq(int irq, void *_lm)
398 lm8323_configure(lm); 398 lm8323_configure(lm);
399 } 399 }
400 for (i = 0; i < LM8323_NUM_PWMS; i++) { 400 for (i = 0; i < LM8323_NUM_PWMS; i++) {
401 if (ints & (1 << (INT_PWM1 + i))) { 401 if (ints & (INT_PWM1 << i)) {
402 dev_vdbg(&lm->client->dev, 402 dev_vdbg(&lm->client->dev,
403 "pwm%d engine completed\n", i); 403 "pwm%d engine completed\n", i);
404 pwm_done(&lm->pwm[i]); 404 pwm_done(&lm->pwm[i]);
diff --git a/drivers/input/matrix-keymap.c b/drivers/input/matrix-keymap.c
index 419cb6b88e2a..3ae496ea5fe6 100644
--- a/drivers/input/matrix-keymap.c
+++ b/drivers/input/matrix-keymap.c
@@ -24,6 +24,7 @@
24#include <linux/input.h> 24#include <linux/input.h>
25#include <linux/of.h> 25#include <linux/of.h>
26#include <linux/export.h> 26#include <linux/export.h>
27#include <linux/module.h>
27#include <linux/input/matrix_keypad.h> 28#include <linux/input/matrix_keypad.h>
28 29
29static bool matrix_keypad_map_key(struct input_dev *input_dev, 30static bool matrix_keypad_map_key(struct input_dev *input_dev,
@@ -182,3 +183,5 @@ int matrix_keypad_build_keymap(const struct matrix_keymap_data *keymap_data,
182 return 0; 183 return 0;
183} 184}
184EXPORT_SYMBOL(matrix_keypad_build_keymap); 185EXPORT_SYMBOL(matrix_keypad_build_keymap);
186
187MODULE_LICENSE("GPL");
diff --git a/drivers/input/mouse/sentelic.c b/drivers/input/mouse/sentelic.c
index e582922bacf7..cc7e0d4a8f93 100644
--- a/drivers/input/mouse/sentelic.c
+++ b/drivers/input/mouse/sentelic.c
@@ -791,7 +791,7 @@ static psmouse_ret_t fsp_process_byte(struct psmouse *psmouse)
791 fsp_set_slot(dev, 0, fgrs > 0, abs_x, abs_y); 791 fsp_set_slot(dev, 0, fgrs > 0, abs_x, abs_y);
792 fsp_set_slot(dev, 1, false, 0, 0); 792 fsp_set_slot(dev, 1, false, 0, 0);
793 } 793 }
794 if (fgrs > 0) { 794 if (fgrs == 1 || (fgrs == 2 && !(packet[0] & FSP_PB0_MFMC_FGR2))) {
795 input_report_abs(dev, ABS_X, abs_x); 795 input_report_abs(dev, ABS_X, abs_x);
796 input_report_abs(dev, ABS_Y, abs_y); 796 input_report_abs(dev, ABS_Y, abs_y);
797 } 797 }
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index f92d34f45a1c..aaf23aeae2ea 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -553,10 +553,10 @@ static int wacom_set_device_mode(struct usb_interface *intf, int report_id, int
553 if (!rep_data) 553 if (!rep_data)
554 return error; 554 return error;
555 555
556 rep_data[0] = report_id;
557 rep_data[1] = mode;
558
559 do { 556 do {
557 rep_data[0] = report_id;
558 rep_data[1] = mode;
559
560 error = wacom_set_report(intf, WAC_HID_FEATURE_REPORT, 560 error = wacom_set_report(intf, WAC_HID_FEATURE_REPORT,
561 report_id, rep_data, length, 1); 561 report_id, rep_data, length, 1);
562 if (error >= 0) 562 if (error >= 0)
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index ad11ec543623..41b6fbf60112 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -2036,7 +2036,8 @@ static const struct wacom_features wacom_features_0xD1 =
2036 .touch_max = 2 }; 2036 .touch_max = 2 };
2037static const struct wacom_features wacom_features_0xD2 = 2037static const struct wacom_features wacom_features_0xD2 =
2038 { "Wacom Bamboo Craft", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, 2038 { "Wacom Bamboo Craft", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023,
2039 31, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 2039 31, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES,
2040 .touch_max = 2 };
2040static const struct wacom_features wacom_features_0xD3 = 2041static const struct wacom_features wacom_features_0xD3 =
2041 { "Wacom Bamboo 2FG 6x8", WACOM_PKGLEN_BBFUN, 21648, 13700, 1023, 2042 { "Wacom Bamboo 2FG 6x8", WACOM_PKGLEN_BBFUN, 21648, 13700, 1023,
2042 31, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES, 2043 31, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES,