[PATCH v2] input: constify valuators passed in by input drivers.

Peter Hutterer peter.hutterer at who-t.net
Mon Aug 9 22:28:30 PDT 2010


On Tue, Aug 10, 2010 at 03:05:48PM +1000, Daniel Stone wrote:
> On Tue, Aug 10, 2010 at 01:59:13PM +1000, Peter Hutterer wrote:
> > GPE modifies the valuators array passed in. Which means any driver using
> > e.g. xf86PostButtonEventP(..., valuators) twice to emulate a button click
> > will provide garbage data on the second run.
> > 
> > Constify the argument, and do the same for keyboard and proximity events.
> > 
> > Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> > ---
> > Changes to v1:
> > - valuators array malloc'ed now instead of the previous 
> >   "int valuators[num_valuators]"
> 
> malloc() in a signal handler ftl 

urgh, yes, thanks.

> I guess you could just have a static int copied_valuators[MAX_VALUATORS].

I thought about that but there's more cleanup needed, GPE isn't 100%
signal-safe yet, there's at least one caller that may screw up here. 
squash one bug, two more come out of the woodworks...

Either way, please ignore this patch for now, it was only exposed due to a
new proposed change in the wacom driver and I've already put said patch
on hold for backwards compat issues.

Cheers,
  Peter


More information about the xorg-devel mailing list