linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lyude Paul <lyude@redhat.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: linux-input <linux-input@vger.kernel.org>,
	Andrew Duggan <aduggan@synaptics.com>,
	stable@vger.kernel.org, Jiri Kosina <jikos@kernel.org>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] HID: rmi: Make sure the HID device is opened on resume
Date: Mon, 24 Jul 2017 13:45:13 -0400	[thread overview]
Message-ID: <1500918313.6243.1.camel@redhat.com> (raw)
In-Reply-To: <CAHp75VcZxAEr+ARw0U1nxtXR1fgWrQ1w=dhpZbm+DRiDbwajYA@mail.gmail.com>

On Sun, 2017-07-23 at 12:54 +0300, Andy Shevchenko wrote:
> On Sun, Jul 23, 2017 at 4:15 AM, Lyude <lyude@redhat.com> wrote:
> 
> > So, call hid_hw_open() in rmi_post_resume() so we make sure that
> > the
> > device is alive before we try talking to it.
> > 
> > This fixes RMI device suspend/resume over HID.
> > -       int ret;
> > +       int ret = 0;
> 
> What's the point?
So that we can use the same out: label at the end of the function that
calls hid_hw_close() to return success. This being said though I just
realized that setting ret will initialize it to 0 anyway, so I guess
this can be dropped
> 
> > 
> >         if (!(data->device_flags & RMI_DEVICE))
> >                 return 0;
> > 
> > -       ret = rmi_reset_attn_mode(hdev);
> > +       /* Make sure the HID device is ready to receive events */
> > +       ret = hid_hw_open(hdev);
> >         if (ret)
> >                 return ret;
> 
> 

  reply	other threads:[~2017-07-24 17:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-23  1:15 [PATCH] HID: rmi: Make sure the HID device is opened on resume Lyude
2017-07-23  9:54 ` Andy Shevchenko
2017-07-24 17:45   ` Lyude Paul [this message]
2017-07-24 19:28     ` Jiri Kosina
2017-07-24 19:46       ` Lyude Paul
2017-07-24  8:15 ` Benjamin Tissoires
2017-07-24 17:49   ` Lyude Paul
2017-09-08  7:16     ` Benjamin Tissoires
2017-09-08 13:01       ` Jiri Kosina
  -- strict thread matches above, loose matches on Subject: below --
2017-08-08 14:45 william

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=1500918313.6243.1.camel@redhat.com \
    --to=lyude@redhat.com \
    --cc=aduggan@synaptics.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@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 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).