diff options
author | Stefan Assmann <sassmann@kpanic.de> | 2015-04-23 13:33:45 +0200 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2015-04-25 14:20:42 +0200 |
commit | 83957c979a7c241e228fff0ba04db4c2aef3f90c (patch) | |
tree | 1df8f799618c029648ad45556309c100dad13f55 /patches/collateral-evolutions/network/0058-ptp_getsettime64/ptp_getsettime64.cocci | |
parent | ea8b7cd797ca0cd30ae94dc15941cf91f93b4529 (diff) |
backports: deal with struct struct ptp_clock_info get/settime64 changes
In kernel 4.1 struct ptp_clock_info changes function pointers gettime,
settime to gettime64, settime64.
Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'patches/collateral-evolutions/network/0058-ptp_getsettime64/ptp_getsettime64.cocci')
-rw-r--r-- | patches/collateral-evolutions/network/0058-ptp_getsettime64/ptp_getsettime64.cocci | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/patches/collateral-evolutions/network/0058-ptp_getsettime64/ptp_getsettime64.cocci b/patches/collateral-evolutions/network/0058-ptp_getsettime64/ptp_getsettime64.cocci new file mode 100644 index 00000000..3f85c2a4 --- /dev/null +++ b/patches/collateral-evolutions/network/0058-ptp_getsettime64/ptp_getsettime64.cocci @@ -0,0 +1,33 @@ +// ---------------------------------------------------------------------------- +// handle gettime64 to gettime function assignments +@r1@ +expression E1, E2; +@@ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0) + E1.gettime64 = E2; ++#else ++E1.gettime = E2; ++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0) */ + +// ---------------------------------------------------------------------------- +// handle calls to gettime64 as calls to gettime +@r2@ +expression E1, E2, E3; +@@ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0) + E1.gettime64(E2, E3); ++#else ++E1.gettime(E2, E3); ++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0) */ + +// ---------------------------------------------------------------------------- +// handle settime64 to settime function assignments +@r3@ +expression E1, E2; +@@ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0) + E1.settime64 = E2; ++#else ++E1.settime = E2; ++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0) */ + |