linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Jiri Kosina <jkosina@suse.cz>
Cc: Frank Praznik <frank.praznik@oh.rr.com>, linux-input@vger.kernel.org
Subject: Re: [PATCH] HID: sony: Fix uninitialized spinlocks
Date: Fri, 27 Feb 2015 19:23:43 +0100	[thread overview]
Message-ID: <20150227182343.GB10971@amd> (raw)
In-Reply-To: <alpine.LNX.2.00.1502231302490.19920@pobox.suse.cz>

On Mon 2015-02-23 13:03:17, Jiri Kosina wrote:
> On Sun, 22 Feb 2015, Frank Praznik wrote:
> 
> > Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
> > ---
> >  drivers/hid/hid-sony.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
> > index 9e0987d..27f67e7 100644
> > --- a/drivers/hid/hid-sony.c
> > +++ b/drivers/hid/hid-sony.c
> > @@ -805,7 +805,7 @@ union sixaxis_output_report_01 {
> >  #define SIXAXIS_REPORT_0xF2_SIZE 17
> >  #define SIXAXIS_REPORT_0xF5_SIZE 8
> >  
> > -static spinlock_t sony_dev_list_lock;
> > +static DEFINE_SPINLOCK(sony_dev_list_lock);
> >  static LIST_HEAD(sony_device_list);
> >  static DEFINE_IDA(sony_device_id_allocator);
> 
> This hunk was already in my tree from earlier today.
> 
> >  
> > @@ -1965,6 +1965,8 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)
> >  		return -ENOMEM;
> >  	}
> >  
> > +	spin_lock_init(&sc->lock);
> > +
> >  	sc->quirks = quirks;
> >  	hid_set_drvdata(hdev, sc);
> >  	sc->hdev = hdev;
> 
> I have applied this one from your patch. I have also added a bit of 
> changelog.

Acked-by: Pavel Machek <pavel@ucw.cz>

I should be able to test it on monday, but I guess that patch  is so simple
that it is not really required...?

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

      reply	other threads:[~2015-02-27 18:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-23  1:42 [PATCH] HID: sony: Fix uninitialized spinlocks Frank Praznik
2015-02-23 12:03 ` Jiri Kosina
2015-02-27 18:23   ` Pavel Machek [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=20150227182343.GB10971@amd \
    --to=pavel@ucw.cz \
    --cc=frank.praznik@oh.rr.com \
    --cc=jkosina@suse.cz \
    --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 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).