kernel: add new ltq-vdsl-vr11 driver
[openwrt/staging/neocturne.git] / package / kernel / lantiq / ltq-vdsl-vr11 / patches / 100-compat.patch
1 --- a/src/common/drv_dsl_cpe_os_linux.c
2 +++ b/src/common/drv_dsl_cpe_os_linux.c
3 @@ -1051,12 +1051,11 @@ DSL_int32_t DSL_DRV_ThreadShutdown(
4
5 DSL_uint32_t DSL_DRV_SysTimeGet(DSL_uint32_t nOffset)
6 {
7 - struct timeval tv;
8 + struct timespec64 now;
9 DSL_uint32_t nTime = 0;
10
11 - memset(&tv, 0, sizeof(tv));
12 - do_gettimeofday(&tv);
13 - nTime = (DSL_uint32_t)tv.tv_sec;
14 + ktime_get_real_ts64(&now);
15 + nTime = (DSL_uint32_t)now.tv_sec;
16
17 if ( (nOffset == 0) || (nOffset > nTime) )
18 {