struct nct1008_data *data;
int err;
int i;
- int mask = 0;
+ u64 mask = 0;
char nct_int_name[THERMAL_NAME_LENGTH];
char nct_ext_name[THERMAL_NAME_LENGTH];
for (i = 0; i < data->plat_data.num_trips; i++)
if (strcmp(data->plat_data.trips[i].cdev_type,
"shutdown_warning"))
- mask |= (1 << i);
+ mask |= (1ULL << i);
if (data->plat_data.loc_name) {
strcpy(nct_int_name, "Tboard_");
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)
}
}
-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);
}
*
* 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;
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;
* 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)
#include <linux/workqueue.h>
#define THERMAL_TRIPS_NONE -1
-#define THERMAL_MAX_TRIPS 32
+#define THERMAL_MAX_TRIPS 48
#define THERMAL_NAME_LENGTH 20
/* invalid cooling state */
* thermal zone and cdev, for a particular trip point.
* See Documentation/thermal/sysfs-api.txt for more information.
*/
- int trip_mask;
+ u64 trip_mask;
int (*match) (struct thermal_zone_device *tz,
struct thermal_cooling_device *cdev);
};
};
/* Function declarations */
-struct thermal_zone_device *thermal_zone_device_register(const char *, int, int,
+struct thermal_zone_device *thermal_zone_device_register(const char *, int, u64,
void *, const struct thermal_zone_device_ops *,
const struct thermal_zone_params *, int, int);
void thermal_zone_device_unregister(struct thermal_zone_device *);