aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal
diff options
context:
space:
mode:
authorAnton Vorontsov <anton.vorontsov@linaro.org>2012-07-31 07:39:30 -0400
committerAnton Vorontsov <anton.vorontsov@linaro.org>2012-07-31 08:45:37 -0400
commit4b1bf5871f7d59de6484cc887e205d6d2f1e6fbd (patch)
tree892158a070e8897ef6a6101e740074ae6d5ad9eb /drivers/thermal
parente6db06a53b1dcf4e9da4aba143e2eb4d63418abb (diff)
thermal: Constify 'type' argument for the registration routine
thermal_zone_device_register() does not modify 'type' argument, so it is safe to declare it as const. Otherwise, if we pass a const string, we are getting the ugly warning: CC drivers/power/power_supply_core.o drivers/power/power_supply_core.c: In function 'psy_register_thermal': drivers/power/power_supply_core.c:204:6: warning: passing argument 1 of 'thermal_zone_device_register' discards 'const' qualifier from pointer target type [enabled by default] include/linux/thermal.h:140:29: note: expected 'char *' but argument is of type 'const char *' Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org> Acked-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/thermal_sys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
index 5feb3353213f..32aa66d7d6b3 100644
--- a/drivers/thermal/thermal_sys.c
+++ b/drivers/thermal/thermal_sys.c
@@ -1173,7 +1173,7 @@ static void remove_trip_attrs(struct thermal_zone_device *tz)
1173 * longer needed. The passive cooling formula uses tc1 and tc2 as described in 1173 * longer needed. The passive cooling formula uses tc1 and tc2 as described in
1174 * section 11.1.5.1 of the ACPI specification 3.0. 1174 * section 11.1.5.1 of the ACPI specification 3.0.
1175 */ 1175 */
1176struct thermal_zone_device *thermal_zone_device_register(char *type, 1176struct thermal_zone_device *thermal_zone_device_register(const char *type,
1177 int trips, int mask, void *devdata, 1177 int trips, int mask, void *devdata,
1178 const struct thermal_zone_device_ops *ops, 1178 const struct thermal_zone_device_ops *ops,
1179 int tc1, int tc2, int passive_delay, int polling_delay) 1179 int tc1, int tc2, int passive_delay, int polling_delay)