All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Pandruvada, Srinivas" <srinivas.pandruvada@intel.com>
To: "jikos@kernel.org" <jikos@kernel.org>, "Xu, Even" <even.xu@intel.com>
Cc: "linux-input@vger.kernel.org" <linux-input@vger.kernel.org>
Subject: Re: [PATCH 3/3] hid: intel-ish-hid: ipc: use msleep_interrupt() for wait
Date: Tue, 15 Nov 2016 18:10:27 +0000	[thread overview]
Message-ID: <1479233425.6544.47.camel@intel.com> (raw)
In-Reply-To: <1478828433-31779-1-git-send-email-even.xu@intel.com>

On Fri, 2016-11-11 at 09:40 +0800, Even Xu wrote:
> set_current_task() must be called before schedule_timeout(), for this
> driver, in order to avoid incorrect usage, use msleep_interrupt()
> instead.
> 
> Signed-off-by: Even Xu <even.xu@intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>

> ---
>  drivers/hid/intel-ish-hid/ipc/ipc.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/hid/intel-ish-hid/ipc/ipc.c b/drivers/hid/intel-
> ish-hid/ipc/ipc.c
> index 8194c35..86a36eb 100644
> --- a/drivers/hid/intel-ish-hid/ipc/ipc.c
> +++ b/drivers/hid/intel-ish-hid/ipc/ipc.c
> @@ -539,6 +539,8 @@ static int ish_fw_reset_handler(struct
> ishtp_device *dev)
>  	return	0;
>  }
>  
> +#define TIMEOUT_FOR_HW_RDY_MS			300
> +
>  /**
>   * ish_fw_reset_work_fn() - FW reset worker function
>   * @unused: not used
> @@ -552,7 +554,7 @@ static void fw_reset_work_fn(struct work_struct
> *unused)
>  	rv = ish_fw_reset_handler(ishtp_dev);
>  	if (!rv) {
>  		/* ISH is ILUP & ISHTP-ready. Restart ISHTP */
> -		schedule_timeout(HZ / 3);
> +		msleep_interruptible(TIMEOUT_FOR_HW_RDY_MS);
>  		ishtp_dev->recvd_hw_ready = 1;
>  		wake_up_interruptible(&ishtp_dev->wait_hw_ready);
>  

      parent reply	other threads:[~2016-11-15 18:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-11  1:40 [PATCH 3/3] hid: intel-ish-hid: ipc: use msleep_interrupt() for wait Even Xu
2016-11-15 13:27 ` Jiri Kosina
2016-11-15 14:37   ` Xu, Even
2016-11-15 18:10 ` Pandruvada, Srinivas [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=1479233425.6544.47.camel@intel.com \
    --to=srinivas.pandruvada@intel.com \
    --cc=even.xu@intel.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.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 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.