Message ID | 1353835487.2176.6.camel@rzhang1-mobl4 (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Zhang Rui |
Headers | show |
diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c index 81dce23..b8e6ffc 100644 --- a/drivers/thermal/rcar_thermal.c +++ b/drivers/thermal/rcar_thermal.c @@ -43,6 +43,8 @@ struct rcar_thermal_priv { u32 comp; }; +#define rcar_zone_to_priv(zone) (zone->devdata) + /* * basic functions */ @@ -96,7 +98,7 @@ static void rcar_thermal_bset(struct rcar_thermal_priv *priv, u32 reg, static int rcar_thermal_get_temp(struct thermal_zone_device *zone, unsigned long *temp) { - struct rcar_thermal_priv *priv = zone->devdata; + struct rcar_thermal_priv *priv = rcar_zone_to_priv(zone); int val, min, max, tmp; tmp = -200; /* default */