mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-06 15:51:34 +00:00
Define __devexit_p for kernels which don't know about it (2.4.16
and older). git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2801 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
971dabe55e
commit
50263be538
1 file changed
+20
@@ -10,6 +10,8 @@
|
||||
#ifndef _SENSORS_COMPAT_H_
|
||||
#define _SENSORS_COMPAT_H_
|
||||
|
||||
#include <linux/config.h>
|
||||
|
||||
/* debugging and troubleshooting/diagnostic helpers. */
|
||||
#define dev_printk(level, dev, format, arg...) \
|
||||
printk(level "%s: " format , (dev)->name , ## arg)
|
||||
@@ -28,4 +30,22 @@
|
||||
#define dev_warn(dev, format, arg...) \
|
||||
dev_printk(KERN_WARNING , dev , format , ## arg)
|
||||
|
||||
|
||||
/* The part below, taken from linux/init.h, is required for compatibility with
|
||||
kernels 2.4.16 and older, which don't know about __devexit_p. */
|
||||
|
||||
/* Functions marked as __devexit may be discarded at kernel link time, depending
|
||||
on config options. Newer versions of binutils detect references from
|
||||
retained sections to discarded sections and flag an error. Pointers to
|
||||
__devexit functions must use __devexit_p(function_name), the wrapper will
|
||||
insert either the function_name or NULL, depending on the config options.
|
||||
*/
|
||||
#ifndef __devexit_p
|
||||
#if defined(MODULE) || defined(CONFIG_HOTPLUG)
|
||||
#define __devexit_p(x) x
|
||||
#else
|
||||
#define __devexit_p(x) NULL
|
||||
#endif
|
||||
#endif /* __devexit_p */
|
||||
|
||||
#endif /* _SENSORS_COMPAT_H_ */
|
||||
Reference in new issue
Block a user