diff options
Diffstat (limited to 'patches/0058-ptp_getsettime64/ptp_getsettime64.cocci')
-rw-r--r-- | patches/0058-ptp_getsettime64/ptp_getsettime64.cocci | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/patches/0058-ptp_getsettime64/ptp_getsettime64.cocci b/patches/0058-ptp_getsettime64/ptp_getsettime64.cocci new file mode 100644 index 00000000..3f85c2a4 --- /dev/null +++ b/patches/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) */ + |