On 21-05-2013 05:20, Sachin Kamat wrote: > Fixes the following compilation error introduced by commit 253e3ae170 > (Thermal: spear_thermal: convert to devm_ioremap_resource). > drivers/thermal/spear_thermal.c: In function ‘spear_thermal_probe’: > drivers/thermal/spear_thermal.c:123:46: error: ‘dev’ undeclared > (first use in this function) > stdev->thermal_base = devm_ioremap_resource(dev, res); > > While at it also remove the error message as devm_ioremap_resource() > provides its own error messages. > > Signed-off-by: Sachin Kamat > Cc: Vincenzo Frascino > Cc: Viresh Kumar Acked-by: Eduardo Valentin > --- > Compile tested and based on linux-next (20130521). Also compiled tested on same linux-next. Tested-by: Eduardo Valentin > --- > drivers/thermal/spear_thermal.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/thermal/spear_thermal.c b/drivers/thermal/spear_thermal.c > index fa30918..813add6 100644 > --- a/drivers/thermal/spear_thermal.c > +++ b/drivers/thermal/spear_thermal.c > @@ -120,11 +120,9 @@ static int spear_thermal_probe(struct platform_device *pdev) > > /* Enable thermal sensor */ > res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - stdev->thermal_base = devm_ioremap_resource(dev, res); > - if (IS_ERR(stdev->thermal_base)) { > - dev_err(&pdev->dev, "ioremap failed\n"); > + stdev->thermal_base = devm_ioremap_resource(&pdev->dev, res); > + if (IS_ERR(stdev->thermal_base)) > return PTR_ERR(stdev->thermal_base); > - } > > stdev->clk = devm_clk_get(&pdev->dev, NULL); > if (IS_ERR(stdev->clk)) { >