diff options
Diffstat (limited to 'patches/0037-ethtool_get_module/get_module.cocci')
-rw-r--r-- | patches/0037-ethtool_get_module/get_module.cocci | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/patches/0037-ethtool_get_module/get_module.cocci b/patches/0037-ethtool_get_module/get_module.cocci new file mode 100644 index 00000000..c04ccc41 --- /dev/null +++ b/patches/0037-ethtool_get_module/get_module.cocci @@ -0,0 +1,37 @@ +@r1@ +identifier s, func; +@@ + +struct ethtool_ops s = { ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) +.get_module_info = func, ++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) */ +}; + +@r2@ +identifier s, func; +@@ + +struct ethtool_ops s = { ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) +.get_module_eeprom = func, ++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) */ +}; + +// ---------------------------------------------------------------------- + +@@ +identifier r1.func; +@@ + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) +func(...) { ... } ++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) */ + +@@ +identifier r2.func; +@@ + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) +func(...) { ... } ++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) */ |