]> git.pld-linux.org Git - packages/igb.git/blame - timespec64.patch
- typo
[packages/igb.git] / timespec64.patch
CommitLineData
d1c0ba0d
JR
1--- igb-5.3.2/src/igb_ptp.c~ 2015-05-26 23:59:51.000000000 +0200
2+++ igb-5.3.2/src/igb_ptp.c 2015-06-29 08:05:18.930401431 +0200
f6d4ede3 3@@ -327,7 +327,11 @@
d1c0ba0d
JR
4 }
5
6 static int igb_ptp_gettime64_82576(struct ptp_clock_info *ptp,
f6d4ede3
JR
7+#if ( LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) )
8 struct timespec *ts64)
9+#else
d1c0ba0d 10+ struct timespec64 *ts64)
1ce96dd3 11+#endif
d1c0ba0d
JR
12 {
13 struct igb_adapter *igb = container_of(ptp, struct igb_adapter,
14 ptp_caps);
f6d4ede3 15@@ -350,7 +350,11 @@
d1c0ba0d
JR
16 }
17
18 static int igb_ptp_gettime64_i210(struct ptp_clock_info *ptp,
f6d4ede3
JR
19+#if ( LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) )
20 struct timespec *ts64)
21+#else
d1c0ba0d 22+ struct timespec64 *ts64)
1ce96dd3 23+#endif
d1c0ba0d
JR
24 {
25 struct igb_adapter *igb = container_of(ptp, struct igb_adapter,
26 ptp_caps);
f6d4ede3 27@@ -369,7 +369,11 @@
d1c0ba0d
JR
28
29 #ifdef HAVE_PTP_CLOCK_INFO_GETTIME64
30 static int igb_ptp_settime64_82576(struct ptp_clock_info *ptp,
f6d4ede3
JR
31+#if ( LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) )
32 const struct timespec *ts64)
33+#else
d1c0ba0d 34+ const struct timespec64 *ts64)
1ce96dd3 35+#endif
d1c0ba0d
JR
36 {
37 struct igb_adapter *igb = container_of(ptp, struct igb_adapter,
38 ptp_caps);
f6d4ede3 39@@ -392,7 +392,11 @@
d1c0ba0d
JR
40
41 #endif
42 static int igb_ptp_settime64_i210(struct ptp_clock_info *ptp,
f6d4ede3
JR
43+#if ( LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) )
44 const struct timespec *ts64)
45+#else
d1c0ba0d 46+ const struct timespec64 *ts64)
1ce96dd3 47+#endif
d1c0ba0d
JR
48 {
49 struct igb_adapter *igb = container_of(ptp, struct igb_adapter,
50 ptp_caps);
f6d4ede3 51@@ -522,7 +522,11 @@
7d4abbb5
JR
52 {
53 struct igb_adapter *igb =
54 container_of(work, struct igb_adapter, ptp_overflow_work.work);
f6d4ede3
JR
55+#if ( LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) )
56 struct timespec ts;
57+#else
7d4abbb5 58+ struct timespec64 ts;
1ce96dd3 59+#endif
7d4abbb5
JR
60
61 igb_ptp_gettime64_82576(&igb->ptp_caps, &ts);
62
f6d4ede3 63@@ -961,7 +961,11 @@
7d4abbb5
JR
64
65 /* Initialize the clock and overflow work for devices that need it. */
66 if ((hw->mac.type == e1000_i210) || (hw->mac.type == e1000_i211)) {
f6d4ede3
JR
67+#if ( LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) )
68 struct timespec ts = ktime_to_timespec(ktime_get_real());
69+#else
08b9df66 70+ struct timespec64 ts = ktime_to_timespec64(ktime_get_real());
1ce96dd3 71+#endif
7d4abbb5
JR
72
73 igb_ptp_settime64_i210(&adapter->ptp_caps, &ts);
74 } else {
f6d4ede3 75@@ -1073,7 +1073,11 @@
7d4abbb5
JR
76
77 /* Re-initialize the timer. */
78 if ((hw->mac.type == e1000_i210) || (hw->mac.type == e1000_i211)) {
f6d4ede3
JR
79+#if ( LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) )
80 struct timespec ts = ktime_to_timespec(ktime_get_real());
81+#else
7d4abbb5 82+ struct timespec64 ts = ktime_to_timespec64(ktime_get_real());
1ce96dd3 83+#endif
7d4abbb5
JR
84
85 igb_ptp_settime64_i210(&adapter->ptp_caps, &ts);
86 } else {
This page took 0.076834 seconds and 4 git commands to generate.