Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030832AbcCQNzU (ORCPT ); Thu, 17 Mar 2016 09:55:20 -0400 Received: from mail-pf0-f176.google.com ([209.85.192.176]:35537 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752083AbcCQNzR (ORCPT ); Thu, 17 Mar 2016 09:55:17 -0400 Date: Thu, 17 Mar 2016 19:25:11 +0530 From: Amitoj Kaur Chawla To: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: tj@kernel.org, outreachy-kernel@googlegroups.com Subject: [PATCH] iio: light: tsl2563: Remove flush_scheduled_work Message-ID: <20160317135510.GA4831@amitoj-Inspiron-3542> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 909 Lines: 30 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 --- 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