瀏覽代碼

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 <tj@kernel.org>
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Amitoj Kaur Chawla 9 年之前
父節點
當前提交
9e61d90115
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      drivers/iio/light/tsl2563.c

+ 1 - 2
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;
 }