aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2008-02-09 04:01:48 -0500
committerLen Brown <len.brown@intel.com>2008-02-09 04:01:48 -0500
commita0dd25b2c83de4623487ca4de9c1d962b552ca0f (patch)
tree54295837deed8336da2da2ee80043a4a6880779b
parenta6869cc4cfd633d909918f1489a6a8ac668cd6aa (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.h23
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
81struct thermal_zone_device *thermal_zone_device_register(char *, int, void *, 81struct thermal_zone_device *thermal_zone_device_register(char *, int, void *,
82 struct thermal_zone_device_ops *); 82 struct
83 thermal_zone_device_ops
84 *);
83void thermal_zone_device_unregister(struct thermal_zone_device *); 85void thermal_zone_device_unregister(struct thermal_zone_device *);
84 86
85int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int, 87int 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,
87int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int, 89int 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
90struct thermal_cooling_device *thermal_cooling_device_register(char *, void *, 93struct thermal_cooling_device *thermal_cooling_device_register(char *, void *,
91 struct thermal_cooling_device_ops *); 94 struct
95 thermal_cooling_device_ops
96 *);
92void thermal_cooling_device_unregister(struct thermal_cooling_device *); 97void thermal_cooling_device_unregister(struct thermal_cooling_device *);
98#else
99static 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}
105static 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__ */