2002-07-31 12:50:38

by Felipe W Damasio

[permalink] [raw]
Subject: __devexit_p(x) macro

Hi,

Since a lot of net drivers use the "remove" function wrapped with the
__devexit_p macro (which defines the address ONLY when CONFIG_HOTPLUG is
set), isn't the below patch needed for when drivers are compiled as
modules, so that the remove function can be set?

Felipe

--- ./init.h.orig Wed Jul 31 09:43:44 2002
+++ ./init.h Wed Jul 31 09:47:32 2002
@@ -183,7 +183,11 @@
#define __devinitdata __initdata
#define __devexit __exit
#define __devexitdata __exitdata
+#ifdef CONFIG_MODULE
+#define __devexit_p(x) &(x)
+#else
#define __devexit_p(x) 0
-#endif
+#endif /* CONFIG_MODULE */
+#endif /* CONFIG_HOTPLUG */

#endif /* _LINUX_INIT_H */