pps: events reporting fix up
commit276b282e904f690dc930f9bc946110651f297669
authorRodolfo Giometti <giometti@linux.it>
Wed, 11 Nov 2009 22:26:54 +0000 (11 14:26 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 12 Nov 2009 15:26:01 +0000 (12 07:26 -0800)
tree7e50db4cee555f6044bd389452269d3c0fe45ed6
parentcbf83cc5a29dba480cf1ba1c5e3417a0d4a31410
pps: events reporting fix up

PPS events must be recorded according to PPS's mode settings.

If a process asks for (i.e.) capture-assert events only, when the PPS
client calls the pps_event() function to save the current PPS event, we
should verify the event type and then discard unwanted ones.

Also, without this patch userland processes waiting for a specific PPS
event (assert or clear but not both) may be awakened at wrong time.

Signed-off-by: Rodolfo Giometti <giometti@linux.it>
Tested-by: William S. Brasher <billb958@door.net>
Tested-by: Reg Clemens <clemens@dwf.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/pps/kapi.c