net: socket: move ktime2ts to ktime header api
authorDaniel Borkmann <dborkman@redhat.com>
Tue, 16 Apr 2013 01:29:10 +0000 (01:29 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Apr 2013 20:39:13 +0000 (16:39 -0400)
Currently, ktime2ts is a small helper function that is only used in
net/socket.c. Move this helper into the ktime API as a small inline
function, so that i) it's maintained together with ktime routines,
and ii) also other files can make use of it. The function is named
ktime_to_timespec_cond() and placed into the generic part of ktime,
since we internally make use of ktime_to_timespec(). ktime_to_timespec()
itself does not check the ktime variable for zero, hence, we name
this function ktime_to_timespec_cond() for only a conditional
conversion, and adapt its users to it.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

No differences found