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