]> git.baikalelectronics.ru Git - kernel.git/commit
net: fec: avoid timespec use
authorArnd Bergmann <arnd@arndb.de>
Wed, 30 Sep 2015 11:26:31 +0000 (13:26 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Oct 2015 10:16:39 +0000 (03:16 -0700)
commit07f84ace8ad1eca9f408521e4c96347191a1b762
treef02233282f4fe0cabef6f50741f759bcc0d65dac
parenta52299c182bd63d8573e9d0b9dea5089a217705d
net: fec: avoid timespec use

The fec_ptp_enable_pps uses an open-coded implementation of ns_to_timespec,
which will be removed eventually as it is not y2038-safe on 32-bit
architectures. Two more instances of the same code in this file were
already converted to use the safe ns_to_timespec64 in commit 71a81d1c71b
("ptp: fec: use helpers for converting ns to timespec"), this changes
the last one as well.

The seconds portion here is actually unused and we could just remove the
timespec variable, but using ns_to_timespec64 can still be better as the
implementation can be hand-optimized in the future.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Fugang Duan <b38611@freescale.com>
Cc: Luwei Zhou <b45643@freescale.com>
Cc: Frank Li <Frank.Li@freescale.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec_ptp.c