kni: fix build with kernel 3.8

- timecompare (used for hardware timestamping) has been removed.
(see Linux commit 65f8f9a1c1db831e5159e3e3e50912d1f214cd0c)
Simply disable HW_TIME_STAMP feature because it is not used by KNI.

- annotations __devinit and __devexit have been removed.
(see Linux commit 54b956b903607f8f8878754dd4352da6a54a1da2)

Signed-off-by: Intel
This commit is contained in:
Intel 2013-06-03 00:00:00 +00:00 committed by Thomas Monjalon
parent f2e7592c47
commit 630ca10798
2 changed files with 11 additions and 0 deletions

View File

@ -44,6 +44,7 @@
#include <linux/ethtool.h> #include <linux/ethtool.h>
#endif #endif
#undef HAVE_HW_TIME_STAMP
#ifdef HAVE_HW_TIME_STAMP #ifdef HAVE_HW_TIME_STAMP
#include <linux/clocksource.h> #include <linux/clocksource.h>
#include <linux/timecompare.h> #include <linux/timecompare.h>

View File

@ -955,6 +955,16 @@ struct vlan_ethhdr {
#define __devexit_p(x) &(x) #define __devexit_p(x) &(x)
#endif #endif
#else
/* For Kernel 3.8 these are not defined - so undefine all */
#undef __devexit_p
#undef __devexit
#undef __devinit
#undef __devinitdata
#define __devexit_p(x) &(x)
#define __devexit
#define __devinit
#define __devinitdata
#endif /* 2.4.17 => 2.4.13 */ #endif /* 2.4.17 => 2.4.13 */
/*****************************************************************************/ /*****************************************************************************/