* [PATCH] HID: sony: Fix uninitialized spinlocks
@ 2015-02-23 1:42 Frank Praznik
2015-02-23 12:03 ` Jiri Kosina
0 siblings, 1 reply; 3+ messages in thread
From: Frank Praznik @ 2015-02-23 1:42 UTC (permalink / raw)
To: linux-input; +Cc: jkosina, pavel, Frank Praznik
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);
@@ -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;
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] HID: sony: Fix uninitialized spinlocks
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
0 siblings, 1 reply; 3+ messages in thread
From: Jiri Kosina @ 2015-02-23 12:03 UTC (permalink / raw)
To: Frank Praznik; +Cc: linux-input, pavel
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.
Thanks,
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] HID: sony: Fix uninitialized spinlocks
2015-02-23 12:03 ` Jiri Kosina
@ 2015-02-27 18:23 ` Pavel Machek
0 siblings, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2015-02-27 18:23 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Frank Praznik, linux-input
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-02-27 18:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).