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 <abbotti@mev.co.uk>
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
--- /dev/null
+
+#ifndef __COMPAT_LINUX_INIT_H
+#define __COMPAT_LINUX_INIT_H
+
+#include_next <linux/init.h>
+
+#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