diff options
| -rw-r--r-- | drivers/thermal/rcar_thermal.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c index 04a5566b1723..ab518140207d 100644 --- a/drivers/thermal/rcar_thermal.c +++ b/drivers/thermal/rcar_thermal.c | |||
| @@ -400,11 +400,9 @@ static int rcar_thermal_probe(struct platform_device *pdev) | |||
| 400 | /* | 400 | /* |
| 401 | * rcar_has_irq_support() will be enabled | 401 | * rcar_has_irq_support() will be enabled |
| 402 | */ | 402 | */ |
| 403 | common->base = devm_request_and_ioremap(dev, res); | 403 | common->base = devm_ioremap_resource(dev, res); |
| 404 | if (!common->base) { | 404 | if (IS_ERR(common->base)) |
| 405 | dev_err(dev, "Unable to ioremap thermal register\n"); | 405 | return PTR_ERR(common->base); |
| 406 | return -ENOMEM; | ||
| 407 | } | ||
| 408 | 406 | ||
| 409 | /* enable temperature comparation */ | 407 | /* enable temperature comparation */ |
| 410 | rcar_thermal_common_write(common, ENR, 0x00030303); | 408 | rcar_thermal_common_write(common, ENR, 0x00030303); |
| @@ -423,11 +421,9 @@ static int rcar_thermal_probe(struct platform_device *pdev) | |||
| 423 | return -ENOMEM; | 421 | return -ENOMEM; |
| 424 | } | 422 | } |
| 425 | 423 | ||
| 426 | priv->base = devm_request_and_ioremap(dev, res); | 424 | priv->base = devm_ioremap_resource(dev, res); |
| 427 | if (!priv->base) { | 425 | if (IS_ERR(priv->base)) |
| 428 | dev_err(dev, "Unable to ioremap priv register\n"); | 426 | return PTR_ERR(priv->base); |
| 429 | return -ENOMEM; | ||
| 430 | } | ||
| 431 | 427 | ||
| 432 | priv->common = common; | 428 | priv->common = common; |
| 433 | priv->id = i; | 429 | priv->id = i; |
