summaryrefslogtreecommitdiff
path: root/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/thermal/qcom/qcom-spmi-adc-tm5.c')
-rw-r--r--drivers/thermal/qcom/qcom-spmi-adc-tm5.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
index 31164ade2dd1..5749149ae2e4 100644
--- a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
+++ b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
@@ -360,7 +360,7 @@ static irqreturn_t adc_tm5_gen2_isr(int irq, void *data)
static int adc_tm5_get_temp(struct thermal_zone_device *tz, int *temp)
{
- struct adc_tm5_channel *channel = tz->devdata;
+ struct adc_tm5_channel *channel = thermal_zone_device_priv(tz);
int ret;
if (!channel || !channel->iio)
@@ -642,7 +642,7 @@ config_fail:
static int adc_tm5_set_trips(struct thermal_zone_device *tz, int low, int high)
{
- struct adc_tm5_channel *channel = tz->devdata;
+ struct adc_tm5_channel *channel = thermal_zone_device_priv(tz);
struct adc_tm5_chip *chip;
int ret;
@@ -689,7 +689,7 @@ static int adc_tm5_register_tzd(struct adc_tm5_chip *adc_tm)
return PTR_ERR(tzd);
}
adc_tm->channels[i].tzd = tzd;
- if (devm_thermal_add_hwmon_sysfs(tzd))
+ if (devm_thermal_add_hwmon_sysfs(adc_tm->dev, tzd))
dev_warn(adc_tm->dev,
"Failed to add hwmon sysfs attributes\n");
}