• George Spelvin's avatar
    pps: Add pps_lookup_dev() function · 513b032c
    George Spelvin authored
    The PPS serial line discipline wants to attach a PPS device to a tty
    without changing the tty code to add a struct pps_device * pointer.
    
    Since the number of PPS devices in a typical system is generally very low
    (n=1 is by far the most common), it's practical to search the entire list
    of allocated pps devices.  (We capture the timestamp before the lookup,
    so the timing isn't affected.)
    
    It is a bit ugly that this function, which is part of the in-kernel
    PPS API, has to be in pps.c as opposed to kapi,c, but that's not
    something that affects users.
    Signed-off-by: default avatarGeorge Spelvin <linux@horizon.com>
    Acked-by: default avatarRodolfo Giometti <giometti@enneenne.com>
    Cc: stable <stable@vger.kernel.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    513b032c
pps.c 9.91 KB