diff options
author | Sai Gurrappadi <sgurrappadi@nvidia.com> | 2013-11-07 17:51:45 -0800 |
---|---|---|
committer | Diwakar Tundlam <dtundlam@nvidia.com> | 2013-11-15 16:45:04 -0800 |
commit | bf92cc3b3511dfb8bac73bb36704891cebb4b115 (patch) | |
tree | eaf6cceefb56fb827518208815073890890f2a24 /drivers/thermal | |
parent | 05941fedf65e99c242196bb0b3248edbe12b47fa (diff) |
thermal: Update THERMAL_MAX_TRIPS to 48
Also changed mask field from int to u64 to support the larger trip point
number.
Change-Id: I5ab2b381de8094ed0477998ec300164b51e81d7f
Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: http://git-master/r/327982
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
Diffstat (limited to 'drivers/thermal')
-rw-r--r-- | drivers/thermal/thermal_core.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 81c306466ea5..77625099df62 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -210,13 +210,13 @@ static void print_bind_err_msg(struct thermal_zone_device *tz, tz->type, cdev->type, ret); } -static void __bind(struct thermal_zone_device *tz, int mask, +static void __bind(struct thermal_zone_device *tz, u64 mask, struct thermal_cooling_device *cdev) { int i, ret; for (i = 0; i < tz->trips; i++) { - if (mask & (1 << i)) { + if (mask & (1ULL << i)) { ret = thermal_zone_bind_cooling_device(tz, i, cdev, THERMAL_NO_LIMIT, THERMAL_NO_LIMIT); if (ret) @@ -225,13 +225,13 @@ static void __bind(struct thermal_zone_device *tz, int mask, } } -static void __unbind(struct thermal_zone_device *tz, int mask, +static void __unbind(struct thermal_zone_device *tz, u64 mask, struct thermal_cooling_device *cdev) { int i; for (i = 0; i < tz->trips; i++) - if (mask & (1 << i)) + if (mask & (1ULL << i)) thermal_zone_unbind_cooling_device(tz, i, cdev); } @@ -1623,7 +1623,7 @@ EXPORT_SYMBOL(thermal_zone_device_find_by_name); * * Return: 0 on success, the proper error value otherwise. */ -static int create_trip_attrs(struct thermal_zone_device *tz, int mask) +static int create_trip_attrs(struct thermal_zone_device *tz, u64 mask) { int indx; int size = sizeof(struct thermal_attr) * tz->trips; @@ -1671,7 +1671,7 @@ static int create_trip_attrs(struct thermal_zone_device *tz, int mask) tz->trip_temp_attrs[indx].name; tz->trip_temp_attrs[indx].attr.attr.mode = S_IRUGO; tz->trip_temp_attrs[indx].attr.show = trip_point_temp_show; - if (mask & (1 << indx)) { + if (mask & (1ULL << indx)) { tz->trip_temp_attrs[indx].attr.attr.mode |= S_IWUSR; tz->trip_temp_attrs[indx].attr.store = trip_point_temp_store; @@ -1746,7 +1746,7 @@ static void remove_trip_attrs(struct thermal_zone_device *tz) * IS_ERR*() helpers. */ struct thermal_zone_device *thermal_zone_device_register(const char *type, - int trips, int mask, void *devdata, + int trips, u64 mask, void *devdata, const struct thermal_zone_device_ops *ops, const struct thermal_zone_params *tzp, int passive_delay, int polling_delay) |