diff options
Diffstat (limited to 'drivers/thermal/dove_thermal.c')
-rw-r--r-- | drivers/thermal/dove_thermal.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/thermal/dove_thermal.c b/drivers/thermal/dove_thermal.c index 056622a58d00..9954040d1d2c 100644 --- a/drivers/thermal/dove_thermal.c +++ b/drivers/thermal/dove_thermal.c @@ -87,15 +87,12 @@ static int dove_get_temp(struct thermal_zone_device *thermal, int *temp) { unsigned long reg; - struct dove_thermal_priv *priv = thermal->devdata; + struct dove_thermal_priv *priv = thermal_zone_device_priv(thermal); /* Valid check */ reg = readl_relaxed(priv->control + PMU_TEMP_DIOD_CTRL1_REG); - if ((reg & PMU_TDC1_TEMP_VALID_MASK) == 0x0) { - dev_err(&thermal->device, - "Temperature sensor reading not valid\n"); + if ((reg & PMU_TDC1_TEMP_VALID_MASK) == 0x0) return -EIO; - } /* * Calculate temperature. According to Marvell internal |