pps: events reporting fix up
authorRodolfo Giometti <giometti@linux.it>
Wed, 11 Nov 2009 22:26:54 +0000 (14:26 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 8 Dec 2009 18:21:17 +0000 (10:21 -0800)
commitf1d8f4d0822df5c5f06021d221658fe2ad25c0cb
treece19d4cfc37e8b388712dbeeaa545e67d3e81050
parent02caa6be73dbeacafbfa98ecaa39b1dab7d84eb6
pps: events reporting fix up

commit 276b282e904f690dc930f9bc946110651f297669 upstream.

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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pps/kapi.c