Skip to content

Commit

Permalink
ASoC: uniphier: evea: use devm_platform_ioremap_resource() to simplif…
Browse files Browse the repository at this point in the history
…y code

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <[email protected]>
Signed-off-by: YueHaibing <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
YueHaibing authored and broonie committed Jul 31, 2019
1 parent 2d1ffc7 commit 4e5bc35
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions sound/soc/uniphier/evea.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,6 @@ static const struct regmap_config evea_regmap_config = {
static int evea_probe(struct platform_device *pdev)
{
struct evea_priv *evea;
struct resource *res;
void __iomem *preg;
int ret;

Expand All @@ -475,8 +474,7 @@ static int evea_probe(struct platform_device *pdev)
if (IS_ERR(evea->rst_exiv))
return PTR_ERR(evea->rst_exiv);

res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
preg = devm_ioremap_resource(&pdev->dev, res);
preg = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(preg))
return PTR_ERR(preg);

Expand Down

0 comments on commit 4e5bc35

Please sign in to comment.