Skip to contentSkip to conversation

input: cancel_delayed_work_sync() in hp680_ts_input

PATCH Applied Tejun Heo 2 participants 2 messages Oct 15, 2010

Subsystems (2)
lore
Share & tools
lore

Tejun Heo

author
#0 lore raw

PATCH 1/1 input: cancel_delayed_work_sync() in hp680_ts_input

Make hp680_ts_init/exit() call cancel_delayed_work_sync() instead of calling cancel_delayed_work() followed by flush_scheduled_work().

This is to prepare for the deprecation and removal of flush_scheduled_work().

---
 drivers/input/touchscreen/hp680_ts_input.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/input/touchscreen/hp680_ts_input.c +2 -4
Index: work/drivers/input/touchscreen/hp680_ts_input.c
===================================================================
@@ -107,8 +107,7 @@ static int __init hp680_ts_init(void)
 	return 0;
 
  fail2:	free_irq(HP680_TS_IRQ, NULL);
-	cancel_delayed_work(&work);
-	flush_scheduled_work();
+	cancel_delayed_work_sync(&work);
  fail1:	input_free_device(hp680_ts_dev);
 	return err;
 }
@@ -116,8 +115,7 @@ static int __init hp680_ts_init(void)
 static void __exit hp680_ts_exit(void)
 {
 	free_irq(HP680_TS_IRQ, NULL);
-	cancel_delayed_work(&work);
-	flush_scheduled_work();
+	cancel_delayed_work_sync(&work);
 	input_unregister_device(hp680_ts_dev);
 }
 
maintainer Applied
#1 lore raw
Quoted 7 lines · Tejun Heo

Make hp680_ts_init/exit() call cancel_delayed_work_sync() instead of calling cancel_delayed_work() followed by flush_scheduled_work().

This is to prepare for the deprecation and removal of flush_scheduled_work().

Applied, thanks Tejun.

Quoted 28 lines
---
 drivers/input/touchscreen/hp680_ts_input.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Index: work/drivers/input/touchscreen/hp680_ts_input.c
===================================================================

drivers/input/touchscreen/hp680_ts_input.c +2 -4
@@ -107,8 +107,7 @@ static int __init hp680_ts_init(void)
 	return 0;
 
  fail2:	free_irq(HP680_TS_IRQ, NULL);
-	cancel_delayed_work(&work);
-	flush_scheduled_work();
+	cancel_delayed_work_sync(&work);
  fail1:	input_free_device(hp680_ts_dev);
 	return err;
 }
@@ -116,8 +115,7 @@ static int __init hp680_ts_init(void)
 static void __exit hp680_ts_exit(void)
 {
 	free_irq(HP680_TS_IRQ, NULL);
-	cancel_delayed_work(&work);
-	flush_scheduled_work();
+	cancel_delayed_work_sync(&work);
 	input_unregister_device(hp680_ts_dev);
 }
 
Signature · 1 line
Dmitry