compat: add device_create() implementation for Linux 2.6.26 and older
PATCH 1/2 compat: add device_create() implementation for Linux 2.6.26 and older
This should make 25-device_create.patch in compat-wireless unnecessary.
Signed-off-by Pavel Roskin <[email protected]>
--- include/linux/compat-2.6.27.h | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
include/linux/compat-2.6.27.h +8 -0
@@ -228,6 +228,14 @@ static inline void debugfs_remove_recursive(struct dentry *dentry) { }#endif +#define device_create (cls, parent, devt, drvdata, fmt, ...) \ +({ \ + struct device *_dev; \ + _dev = (device_create)(cls, parent, devt, fmt, __VA_ARGS__); \ + dev_set_drvdata(_dev, drvdata); \ + _dev; \ +}) +#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)) */ #endif /* LINUX_26_27_COMPAT_H */
PATCH 2/2 compat: add stub headers linux/tracepoint.h and trace/define_trace.h
This should make 13-trace.patch in compat-wireless unnecessary.
Signed-off-by Pavel Roskin <[email protected]>
--- include/linux/tracepoint.h | 8 ++++++++ include/trace/define_trace.h | 8 ++++++++ 2 files changed, 16 insertions(+), 0 deletions(-) create mode 100644 include/linux/tracepoint.h create mode 100644 include/trace/define_trace.h
include/linux/tracepoint.h new file +8 -0
@@ -0,0 +1,8 @@ +#ifndef _COMPAT_LINUX_TRACEPOINT_H +#define _COMPAT_LINUX_TRACEPOINT_H 1 + +#if (LINUX_VERSION_CODE >KERNEL_VERSION (2 ,6 ,27 )) +#include_next <linux/tracepoint.h> +#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)) */ + +#endif /* _COMPAT_LINUX_TRACEPOINT_H */
include/trace/define_trace.h new file +8 -0
@@ -0,0 +1,8 @@ +#ifndef _COMPAT_TRACE_DEFINE_TRACE_H +#define _COMPAT_TRACE_DEFINE_TRACE_H 1 + +#if (LINUX_VERSION_CODE >KERNEL_VERSION (2 ,6 ,30 )) +#include_next <trace/define_trace.h> +#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30)) */ + +#endif /* _COMPAT_TRACE_DEFINE_TRACE_H */
Luis R. Rodriguez
AppliedRe: [PATCH 2/2] compat: add stub headers linux/tracepoint.h and trace/define_trace.h
Quoted 1 line · Pavel Roskin
This should make 13-trace.patch in compat-wireless unnecessary.
Thanks! Applied both.
Luis