diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2022-05-27 15:48:45 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2022-05-27 15:48:45 -0700 |
commit | 1e90e2628cec11c080db3260833f515cc32fc27c (patch) | |
tree | a50cb16a2046266e39a60bc554782e667edd31c4 /drivers/input/mouse/psmouse-smbus.c | |
parent | b26ff9137183309c18cdfe931e1cafcf3c1a980d (diff) | |
parent | 5f76955ab1e43e5795a9631b22ca4f918a0ae986 (diff) | |
download | linux-next-1e90e2628cec11c080db3260833f515cc32fc27c.tar.gz |
Merge branch 'next' into for-linus
Prepare input updates for 5.19 merge window.
Diffstat (limited to 'drivers/input/mouse/psmouse-smbus.c')
-rw-r--r-- | drivers/input/mouse/psmouse-smbus.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/input/mouse/psmouse-smbus.c b/drivers/input/mouse/psmouse-smbus.c index 164f6c757f6b..2a2459b1b4f2 100644 --- a/drivers/input/mouse/psmouse-smbus.c +++ b/drivers/input/mouse/psmouse-smbus.c @@ -26,6 +26,8 @@ struct psmouse_smbus_dev { static LIST_HEAD(psmouse_smbus_list); static DEFINE_MUTEX(psmouse_smbus_mutex); +static struct workqueue_struct *psmouse_smbus_wq; + static void psmouse_smbus_check_adapter(struct i2c_adapter *adapter) { struct psmouse_smbus_dev *smbdev; @@ -161,7 +163,7 @@ static void psmouse_smbus_schedule_remove(struct i2c_client *client) INIT_WORK(&rwork->work, psmouse_smbus_remove_i2c_device); rwork->client = client; - schedule_work(&rwork->work); + queue_work(psmouse_smbus_wq, &rwork->work); } } @@ -305,9 +307,14 @@ int __init psmouse_smbus_module_init(void) { int error; + psmouse_smbus_wq = alloc_workqueue("psmouse-smbus", 0, 0); + if (!psmouse_smbus_wq) + return -ENOMEM; + error = bus_register_notifier(&i2c_bus_type, &psmouse_smbus_notifier); if (error) { pr_err("failed to register i2c bus notifier: %d\n", error); + destroy_workqueue(psmouse_smbus_wq); return error; } @@ -317,5 +324,5 @@ int __init psmouse_smbus_module_init(void) void psmouse_smbus_module_exit(void) { bus_unregister_notifier(&i2c_bus_type, &psmouse_smbus_notifier); - flush_scheduled_work(); + destroy_workqueue(psmouse_smbus_wq); } |