Re: [PATCH] HID: wiimote: Fix wiimote mp scale linearization

From: Jiri Kosina
Date: Fri Mar 18 2016 - 12:37:54 EST


On Thu, 17 Mar 2016, David Herrmann wrote:

> > @@ -2070,15 +2072,15 @@ static void wiimod_mp_in_mp(struct wiimote_data *wdata, const __u8 *ext)
> > z -= 8192;
> >
> > if (!(ext[3] & 0x02))
> > - x *= 18;
> > + x = (x * 2000 * 9) / 440;
> > else
> > x *= 9;
> > if (!(ext[4] & 0x02))
> > - y *= 18;
> > + y = (y * 2000 * 9) / 440;
> > else
> > y *= 9;
> > if (!(ext[3] & 0x01))
> > - z *= 18;
> > + z = (z * 2000 * 9) / 440;
>
> So 2000/440 ~= 4.5, so this is exactly what the initial comment said.
> Patch looks good to me:
>
> Reviewed-by: David Herrmann <dh.herrmann@xxxxxxxxx>

Appplied to for-4.6/upstream-fixes. Thanks,

--
Jiri Kosina
SUSE Labs