hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/input/mouse/synaptics_i2c.c
....@@ -219,7 +219,6 @@
219219 struct i2c_client *client;
220220 struct input_dev *input;
221221 struct delayed_work dwork;
222
- spinlock_t lock;
223222 int no_data_count;
224223 int no_decel_param;
225224 int reduce_report_param;
....@@ -369,23 +368,11 @@
369368 return xy_delta || gesture;
370369 }
371370
372
-static void synaptics_i2c_reschedule_work(struct synaptics_i2c *touch,
373
- unsigned long delay)
374
-{
375
- unsigned long flags;
376
-
377
- spin_lock_irqsave(&touch->lock, flags);
378
-
379
- mod_delayed_work(system_wq, &touch->dwork, delay);
380
-
381
- spin_unlock_irqrestore(&touch->lock, flags);
382
-}
383
-
384371 static irqreturn_t synaptics_i2c_irq(int irq, void *dev_id)
385372 {
386373 struct synaptics_i2c *touch = dev_id;
387374
388
- synaptics_i2c_reschedule_work(touch, 0);
375
+ mod_delayed_work(system_wq, &touch->dwork, 0);
389376
390377 return IRQ_HANDLED;
391378 }
....@@ -461,7 +448,7 @@
461448 * We poll the device once in THREAD_IRQ_SLEEP_SECS and
462449 * if error is detected, we try to reset and reconfigure the touchpad.
463450 */
464
- synaptics_i2c_reschedule_work(touch, delay);
451
+ mod_delayed_work(system_wq, &touch->dwork, delay);
465452 }
466453
467454 static int synaptics_i2c_open(struct input_dev *input)
....@@ -474,7 +461,7 @@
474461 return ret;
475462
476463 if (polling_req)
477
- synaptics_i2c_reschedule_work(touch,
464
+ mod_delayed_work(system_wq, &touch->dwork,
478465 msecs_to_jiffies(NO_DATA_SLEEP_MSECS));
479466
480467 return 0;
....@@ -530,7 +517,6 @@
530517 touch->scan_rate_param = scan_rate;
531518 set_scan_rate(touch, scan_rate);
532519 INIT_DELAYED_WORK(&touch->dwork, synaptics_i2c_work_handler);
533
- spin_lock_init(&touch->lock);
534520
535521 return touch;
536522 }
....@@ -637,7 +623,7 @@
637623 if (ret)
638624 return ret;
639625
640
- synaptics_i2c_reschedule_work(touch,
626
+ mod_delayed_work(system_wq, &touch->dwork,
641627 msecs_to_jiffies(NO_DATA_SLEEP_MSECS));
642628
643629 return 0;