* tpconfig utility (by C. Scott Ananian and Bruce Kall).
*/
+#include "linux/workqueue.h"
#include <linux/slab.h>
#include <linux/input.h>
#include <linux/input/mt.h>
static void alps_register_bare_ps2_mouse(struct work_struct *work)
{
struct alps_data *priv = container_of(work, struct alps_data,
- dev3_register_work.work);
+ dev3_register_work);
int error;
guard(mutex)(&alps_mutex);
} else if (unlikely(IS_ERR_OR_NULL(priv->dev3))) {
/* Register dev3 mouse if we received PS/2 packet first time */
if (!IS_ERR(priv->dev3))
- psmouse_queue_work(psmouse, &priv->dev3_register_work,
- 0);
+ schedule_work(&priv->dev3_register_work);
return;
} else {
dev = priv->dev3;
psmouse_reset(psmouse);
timer_shutdown_sync(&priv->timer);
- disable_delayed_work_sync(&priv->dev3_register_work);
+ disable_work_sync(&priv->dev3_register_work);
if (priv->dev2)
input_unregister_device(priv->dev2);
if (!IS_ERR_OR_NULL(priv->dev3))
priv->psmouse = psmouse;
- INIT_DELAYED_WORK(&priv->dev3_register_work,
- alps_register_bare_ps2_mouse);
+ INIT_WORK(&priv->dev3_register_work, alps_register_bare_ps2_mouse);
psmouse->protocol_handler = alps_process_byte;
psmouse->poll = alps_poll;
* @dev3: Generic PS/2 mouse (can be NULL, delayed registering).
* @phys2: Physical path for the trackstick device.
* @phys3: Physical path for the generic PS/2 mouse.
- * @dev3_register_work: Delayed work for registering PS/2 mouse.
+ * @dev3_register_work: A work instance for registering PS/2 mouse.
* @nibble_commands: Command mapping used for touchpad register accesses.
* @addr_command: Command used to tell the touchpad that a register address
* follows.
struct input_dev *dev3;
char phys2[32];
char phys3[32];
- struct delayed_work dev3_register_work;
+ struct work_struct dev3_register_work;
/* these are autodetected when the device is identified */
const struct alps_nibble_commands *nibble_commands;