From: Amitoj Kaur Chawla Date: Thu, 17 Mar 2016 13:55:11 +0000 (+0530) Subject: iio: light: tsl2563: Remove flush_scheduled_work X-Git-Tag: v4.14-rc1~3181^2~407^2~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9e61d901155bcd4e58cbce5eb4aaa8e870267334;p=platform%2Fkernel%2Flinux-rpi.git iio: light: tsl2563: Remove flush_scheduled_work 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 Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Jonathan Cameron --- 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; }