All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio: light: tsl2563: Remove flush_scheduled_work
@ 2016-03-17 13:55 Amitoj Kaur Chawla
  2016-03-20 11:05 ` Jonathan Cameron
  0 siblings, 1 reply; 3+ messages in thread
From: Amitoj Kaur Chawla @ 2016-03-17 13:55 UTC (permalink / raw)
  To: jic23, knaack.h, lars, pmeerw, linux-iio, linux-kernel
  Cc: tj, outreachy-kernel

flush_scheduled_work is scheduled for deprecation.
Replace cancel_delayed_work and flush_scheduled_work with
cancel_delayed_work_sync instead to ensure there is no pending or
running work item.

Since there is only one work item, chip->poweroff_work, there are 
no further dependencies of flush_scheduled_work().

Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
---
 drivers/iio/light/tsl2563.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/iio/light/tsl2563.c b/drivers/iio/light/tsl2563.c
index 12731d6..57b108c 100644
--- a/drivers/iio/light/tsl2563.c
+++ b/drivers/iio/light/tsl2563.c
@@ -806,8 +806,7 @@ static int tsl2563_probe(struct i2c_client *client,
 	return 0;
 
 fail:
-	cancel_delayed_work(&chip->poweroff_work);
-	flush_scheduled_work();
+	cancel_delayed_work_sync(&chip->poweroff_work);
 	return err;
 }
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [PATCH] iio: light: tsl2563: Remove flush_scheduled_work
@ 2016-03-15 15:19 Amitoj Kaur Chawla
  0 siblings, 0 replies; 3+ messages in thread
From: Amitoj Kaur Chawla @ 2016-03-15 15:19 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: tj

flush_scheduled_work is scheduled for deprecation. 
Replace cancel_delayed_work and flush_scheduled_work with
cancel_delayed_work_sync instead to ensure there is no pending or
running work item.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
---
 drivers/iio/light/tsl2563.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/iio/light/tsl2563.c b/drivers/iio/light/tsl2563.c
index 12731d6..57b108c 100644
--- a/drivers/iio/light/tsl2563.c
+++ b/drivers/iio/light/tsl2563.c
@@ -806,8 +806,7 @@ static int tsl2563_probe(struct i2c_client *client,
 	return 0;
 
 fail:
-	cancel_delayed_work(&chip->poweroff_work);
-	flush_scheduled_work();
+	cancel_delayed_work_sync(&chip->poweroff_work);
 	return err;
 }
 
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-20 11:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-17 13:55 [PATCH] iio: light: tsl2563: Remove flush_scheduled_work Amitoj Kaur Chawla
2016-03-20 11:05 ` Jonathan Cameron
  -- strict thread matches above, loose matches on Subject: below --
2016-03-15 15:19 Amitoj Kaur Chawla

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.