Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Input: alps - use standard workqueue when registering supplemental device

Registering supplemental bare PS/2 device does not need to be ordered
relative to attempt to resynchronization done in psmouse core.

Switch to the default workqueue and use normal (non-delayed) work.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

+7 -8
+5 -6
drivers/input/mouse/alps.c
··· 12 12 * tpconfig utility (by C. Scott Ananian and Bruce Kall). 13 13 */ 14 14 15 + #include "linux/workqueue.h" 15 16 #include <linux/slab.h> 16 17 #include <linux/input.h> 17 18 #include <linux/input/mt.h> ··· 1453 1452 static void alps_register_bare_ps2_mouse(struct work_struct *work) 1454 1453 { 1455 1454 struct alps_data *priv = container_of(work, struct alps_data, 1456 - dev3_register_work.work); 1455 + dev3_register_work); 1457 1456 int error; 1458 1457 1459 1458 guard(mutex)(&alps_mutex); ··· 1486 1485 } else if (unlikely(IS_ERR_OR_NULL(priv->dev3))) { 1487 1486 /* Register dev3 mouse if we received PS/2 packet first time */ 1488 1487 if (!IS_ERR(priv->dev3)) 1489 - psmouse_queue_work(psmouse, &priv->dev3_register_work, 1490 - 0); 1488 + schedule_work(&priv->dev3_register_work); 1491 1489 return; 1492 1490 } else { 1493 1491 dev = priv->dev3; ··· 2975 2975 2976 2976 psmouse_reset(psmouse); 2977 2977 timer_shutdown_sync(&priv->timer); 2978 - disable_delayed_work_sync(&priv->dev3_register_work); 2978 + disable_work_sync(&priv->dev3_register_work); 2979 2979 if (priv->dev2) 2980 2980 input_unregister_device(priv->dev2); 2981 2981 if (!IS_ERR_OR_NULL(priv->dev3)) ··· 3147 3147 3148 3148 priv->psmouse = psmouse; 3149 3149 3150 - INIT_DELAYED_WORK(&priv->dev3_register_work, 3151 - alps_register_bare_ps2_mouse); 3150 + INIT_WORK(&priv->dev3_register_work, alps_register_bare_ps2_mouse); 3152 3151 3153 3152 psmouse->protocol_handler = alps_process_byte; 3154 3153 psmouse->poll = alps_poll;
+2 -2
drivers/input/mouse/alps.h
··· 257 257 * @dev3: Generic PS/2 mouse (can be NULL, delayed registering). 258 258 * @phys2: Physical path for the trackstick device. 259 259 * @phys3: Physical path for the generic PS/2 mouse. 260 - * @dev3_register_work: Delayed work for registering PS/2 mouse. 260 + * @dev3_register_work: A work instance for registering PS/2 mouse. 261 261 * @nibble_commands: Command mapping used for touchpad register accesses. 262 262 * @addr_command: Command used to tell the touchpad that a register address 263 263 * follows. ··· 289 289 struct input_dev *dev3; 290 290 char phys2[32]; 291 291 char phys3[32]; 292 - struct delayed_work dev3_register_work; 292 + struct work_struct dev3_register_work; 293 293 294 294 /* these are autodetected when the device is identified */ 295 295 const struct alps_nibble_commands *nibble_commands;