From db40f56ddd2fd1df9d15c6cd6814100b84fa1ab3 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Mon, 11 Feb 2013 17:35:18 +0000 Subject: [PATCH] Add linux/init.h compatibility header. Add linux/init.h compatibility header, defining the __devinit, __devinitdata, __devinitconst, __devexit, __devexitdata, __devexitconst and __devexit_p(x) macros if they are not already defined. This is needed for compatibility with Linux kernel 3.8 which removed the macros. We could just remove all uses of the macros from the code, but for now do it this way. Signed-off-by: Ian Abbott --- include/linux/Makefile.am | 2 +- include/linux/init.h | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 include/linux/init.h diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am index 0e025cec..9ebeb762 100644 --- a/include/linux/Makefile.am +++ b/include/linux/Makefile.am @@ -1,4 +1,4 @@ noinst_HEADERS=comedidev.h comedi.h comedilib.h comedi_rt.h compiler.h config.h delay.h device.h firmware.h \ - interrupt.h isapnp.h kernel.h kref.h mm.h mod_devicetable.h module.h moduleparam.h mutex.h pci.h \ + init.h interrupt.h isapnp.h kernel.h kref.h mm.h mod_devicetable.h module.h moduleparam.h mutex.h pci.h \ pci_ids.h pnp.h sched.h slab.h stddef.h time.h types.h usb.h version.h wrapper.h diff --git a/include/linux/init.h b/include/linux/init.h new file mode 100644 index 00000000..787a5037 --- /dev/null +++ b/include/linux/init.h @@ -0,0 +1,35 @@ + +#ifndef __COMPAT_LINUX_INIT_H +#define __COMPAT_LINUX_INIT_H + +#include_next + +#ifndef __devinit +#define __devinit +#endif + +#ifndef __devinitdata +#define __devinitdata +#endif + +#ifndef __devinitconst +#define __devinitconst __devinitdata +#endif + +#ifndef __devexit +#define __devexit +#endif + +#ifndef __devexitdata +#define __devexitdata +#endif + +#ifndef __devexitconst +#define __devexitconst __devexitdata +#endif + +#ifndef __devexit_p +#define __devexit_p(x) x +#endif + +#endif -- 2.26.2