thermal: qpnp-temp-alarm: update thermal callback parameters

Change the type of temperatures in the qpnp-temp-alarm driver
from unsigned long to int.  This ensures that the driver can be
compiled successfully when the following commit is in place
which changed temperatures in the  thermal framework from
unsigned long to int: commit 17e8351a77 ("thermal: consistently
use int for temperatures").

Change-Id: I38c637936b398f2fb1665c8233ed5e49e83bf296
CRs-Fixed: 1019272
Signed-off-by: David Collins <collinsd@codeaurora.org>
This commit is contained in:
David Collins 2016-05-23 15:52:00 -07:00 committed by Kyle Yan
parent 646d81bc9d
commit b31b0103f0

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved.
* Copyright (c) 2011-2016, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@ -87,7 +87,7 @@ struct qpnp_tm_chip {
struct thermal_zone_device *tz_dev;
const char *tm_name;
enum qpnp_tm_adc_type adc_type;
unsigned long temperature;
int temperature;
enum thermal_device_mode mode;
unsigned int thresh;
unsigned int stage;
@ -236,7 +236,7 @@ static int qpnp_tm_update_temp_no_adc(struct qpnp_tm_chip *chip)
}
static int qpnp_tz_get_temp_no_adc(struct thermal_zone_device *thermal,
unsigned long *temperature)
int *temperature)
{
struct qpnp_tm_chip *chip = thermal->devdata;
int rc;
@ -254,7 +254,7 @@ static int qpnp_tz_get_temp_no_adc(struct thermal_zone_device *thermal,
}
static int qpnp_tz_get_temp_qpnp_adc(struct thermal_zone_device *thermal,
unsigned long *temperature)
int *temperature)
{
struct qpnp_tm_chip *chip = thermal->devdata;
int rc;
@ -332,7 +332,7 @@ static int qpnp_tz_get_trip_type(struct thermal_zone_device *thermal,
}
static int qpnp_tz_get_trip_temp(struct thermal_zone_device *thermal,
int trip, unsigned long *temperature)
int trip, int *temperature)
{
struct qpnp_tm_chip *chip = thermal->devdata;
int thresh_temperature;
@ -361,7 +361,7 @@ static int qpnp_tz_get_trip_temp(struct thermal_zone_device *thermal,
}
static int qpnp_tz_get_crit_temp(struct thermal_zone_device *thermal,
unsigned long *temperature)
int *temperature)
{
struct qpnp_tm_chip *chip = thermal->devdata;
@ -420,7 +420,7 @@ static void qpnp_tm_work(struct work_struct *work)
if (chip->stage != chip->prev_stage) {
chip->prev_stage = chip->stage;
pr_crit("%s: PMIC Temp Alarm - stage=%u, threshold=%u, temperature=%lu mC\n",
pr_crit("%s: PMIC Temp Alarm - stage=%u, threshold=%u, temperature=%d mC\n",
chip->tm_name, chip->stage, chip->thresh,
chip->temperature);