linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Amitoj Kaur Chawla <amitoj1606@gmail.com>,
	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: Re: [PATCH] iio: light: tsl2563: Remove flush_scheduled_work
Date: Sun, 20 Mar 2016 11:05:11 +0000	[thread overview]
Message-ID: <56EE83E7.3090407@kernel.org> (raw)
In-Reply-To: <20160317135510.GA4831@amitoj-Inspiron-3542>

On 17/03/16 13:55, Amitoj Kaur Chawla wrote:
> 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>
Applied to the togreg branch of iio.git - initially pushed out as testing
for the autobuilders to play with it.

Thanks,

Jonathan
> ---
>  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;
>  }
>  
> 


      reply	other threads:[~2016-03-20 11:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-17 13:55 [PATCH] iio: light: tsl2563: Remove flush_scheduled_work Amitoj Kaur Chawla
2016-03-20 11:05 ` Jonathan Cameron [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56EE83E7.3090407@kernel.org \
    --to=jic23@kernel.org \
    --cc=amitoj1606@gmail.com \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=outreachy-kernel@googlegroups.com \
    --cc=pmeerw@pmeerw.net \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).