diff options
author | Len Brown <len.brown@intel.com> | 2008-02-09 04:01:48 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-02-09 04:01:48 -0500 |
commit | a0dd25b2c83de4623487ca4de9c1d962b552ca0f (patch) | |
tree | 54295837deed8336da2da2ee80043a4a6880779b | |
parent | a6869cc4cfd633d909918f1489a6a8ac668cd6aa (diff) |
ACPI: thermal: buildfix for CONFIG_THERMAL=n
This fixes the build, but acpi_fan_add() still needs
to be updated to handle thermal_cooling_device_register()
returning NULL as a non-fatal condition.
Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r-- | include/linux/thermal.h | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index bba7712cadc7..818ca1cf0b6d 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h | |||
@@ -79,7 +79,9 @@ struct thermal_zone_device { | |||
79 | }; | 79 | }; |
80 | 80 | ||
81 | struct thermal_zone_device *thermal_zone_device_register(char *, int, void *, | 81 | struct thermal_zone_device *thermal_zone_device_register(char *, int, void *, |
82 | struct thermal_zone_device_ops *); | 82 | struct |
83 | thermal_zone_device_ops | ||
84 | *); | ||
83 | void thermal_zone_device_unregister(struct thermal_zone_device *); | 85 | void thermal_zone_device_unregister(struct thermal_zone_device *); |
84 | 86 | ||
85 | int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int, | 87 | int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int, |
@@ -87,8 +89,23 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int, | |||
87 | int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int, | 89 | int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int, |
88 | struct thermal_cooling_device *); | 90 | struct thermal_cooling_device *); |
89 | 91 | ||
92 | #ifdef CONFIG_THERMAL | ||
90 | struct thermal_cooling_device *thermal_cooling_device_register(char *, void *, | 93 | struct thermal_cooling_device *thermal_cooling_device_register(char *, void *, |
91 | struct thermal_cooling_device_ops *); | 94 | struct |
95 | thermal_cooling_device_ops | ||
96 | *); | ||
92 | void thermal_cooling_device_unregister(struct thermal_cooling_device *); | 97 | void thermal_cooling_device_unregister(struct thermal_cooling_device *); |
98 | #else | ||
99 | static inline struct thermal_cooling_device | ||
100 | *thermal_cooling_device_register(char *c, void *v, | ||
101 | struct thermal_cooling_device_ops *t) | ||
102 | { | ||
103 | return NULL; | ||
104 | } | ||
105 | static inline | ||
106 | void thermal_cooling_device_unregister(struct thermal_cooling_device *t) | ||
107 | { | ||
108 | }; | ||
109 | #endif | ||
93 | 110 | ||
94 | #endif /* __THERMAL_H__ */ | 111 | #endif /* __THERMAL_H__ */ |