diff mbox

[2/5] hid: sony: Add support for the Sony Motion Controller

Message ID 20150505212406.GA15218@amd (mailing list archive)
State New, archived
Delegated to: Jiri Kosina
Headers show

Commit Message

Pavel Machek May 5, 2015, 9:24 p.m. UTC
On Tue 2015-05-05 23:16:40, Pavel Machek wrote:
> Hi!
> 
> > Add a fixed-up HID descriptor for the Sony motion controller and enable
> > controls for the LED light as well as force-feedback.
> > 
> > The LED is multi-colored (red, green, blue) and has a 'global' control to
> > allow it to be flashed or switched on an off atomically.

Oh... I don't think the global control at this level is good idea. Let
me test how it works, but assigning different triggers to global and
red would be interesting, for example.

> > The motion controller has a single rumble motor so the higher of the left and
> > right values is used to set the speed.
> > 
> > Signed-off-by: Pavel Machek <pavel@ucw.cz>
> > Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
> > ---
> > 
> >  Pavel, can you please test this and make sure it works?  
> 
> I tried (on 4.1-rc2), and got this (full dmesg in attachment)

Ok, that one was easy.

Now it registers but the LEDs do not light.
								Pavel
diff mbox

Patch

diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index 46e4ceb..09a8328 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -1770,7 +1770,7 @@  static int sony_allocate_output_report(struct sony_sc *sc)
 		sc->output_report_dmabuf = kmalloc(DS4_REPORT_0x05_SIZE,
 						GFP_KERNEL);
 	else if (sc->quirks & MOTION_CONTROLLER)
-		kmalloc(sizeof(struct motion_output_report_02),
+		sc->output_report_dmabuf = kmalloc(sizeof(struct motion_output_report_02),
 				GFP_KERNEL);
 	else
 		return 0;