aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>2020-02-29 22:36:29 +0100
committerMathias Kresin <dev@kresin.me>2020-03-16 22:28:16 +0100
commit3fa5f058f603013347ea34e91d9193abb832299a (patch)
tree1eb74ab47a4d16a5dea3e05801a499dd3a76fa3c /package
parenta6698551e5bc4b2f049b3303a664ae67d6a0494e (diff)
downloadupstream-3fa5f058f603013347ea34e91d9193abb832299a.tar.gz
upstream-3fa5f058f603013347ea34e91d9193abb832299a.tar.bz2
upstream-3fa5f058f603013347ea34e91d9193abb832299a.zip
lantiq: ltq-vdsl: fix compilation with Linux 5.0+
Upstream commit e4b92b108c6cd6 ("timekeeping: remove obsolete time accessors") removed do_gettimeofday(). In Linux 4.19 this was only a wrapper around ktime_get_real_ts64(). Use ktime_get_real_ts64() now that the wrapper is gone to fix compilation against Linux 5.4. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Diffstat (limited to 'package')
-rw-r--r--package/kernel/lantiq/ltq-vdsl/patches/100-compat.patch27
1 files changed, 24 insertions, 3 deletions
diff --git a/package/kernel/lantiq/ltq-vdsl/patches/100-compat.patch b/package/kernel/lantiq/ltq-vdsl/patches/100-compat.patch
index a8ce61fa36..28d1da7c33 100644
--- a/package/kernel/lantiq/ltq-vdsl/patches/100-compat.patch
+++ b/package/kernel/lantiq/ltq-vdsl/patches/100-compat.patch
@@ -35,7 +35,28 @@
#endif
if (pINode == DSL_NULL)
-@@ -1203,6 +1197,9 @@ static void DSL_DRV_NlSendMsg(DSL_char_t
+@@ -917,12 +911,19 @@ DSL_int32_t DSL_DRV_ThreadShutdown(
+
+ DSL_uint32_t DSL_DRV_SysTimeGet(DSL_uint32_t nOffset)
+ {
+- struct timeval tv;
+ DSL_uint32_t nTime = 0;
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0))
++ struct timeval tv;
+
+ memset(&tv, 0, sizeof(tv));
+ do_gettimeofday(&tv);
+ nTime = (DSL_uint32_t)tv.tv_sec;
++#else
++ struct timespec64 now;
++
++ ktime_get_real_ts64(&now);
++ nTime = (DSL_uint32_t)now.tv_sec;
++#endif
+
+ if ( (nOffset == 0) || (nOffset > nTime) )
+ {
+@@ -1203,6 +1204,9 @@ static void DSL_DRV_NlSendMsg(DSL_char_t
}
#endif
@@ -45,7 +66,7 @@
/* Entry point of driver */
int __init DSL_ModuleInit(void)
{
-@@ -1241,6 +1238,10 @@ int __init DSL_ModuleInit(void)
+@@ -1241,6 +1245,10 @@ int __init DSL_ModuleInit(void)
DSL_DRV_DevNodeInit();
@@ -56,7 +77,7 @@
return 0;
}
-@@ -1248,6 +1249,11 @@ void __exit DSL_ModuleCleanup(void)
+@@ -1248,6 +1256,11 @@ void __exit DSL_ModuleCleanup(void)
{
printk("Module will be unloaded"DSL_DRV_CRLF);