Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: meson: g12a-tohdmitx: use devm_platform_ioremap_resource() to simplify code

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

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190727150738.54764-26-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

YueHaibing and committed by
Mark Brown
a95c9012 12a63c0f

+1 -3
+1 -3
sound/soc/meson/g12a-tohdmitx.c
··· 376 376 static int g12a_tohdmitx_probe(struct platform_device *pdev) 377 377 { 378 378 struct device *dev = &pdev->dev; 379 - struct resource *res; 380 379 void __iomem *regs; 381 380 struct regmap *map; 382 381 383 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 384 - regs = devm_ioremap_resource(dev, res); 382 + regs = devm_platform_ioremap_resource(pdev, 0); 385 383 if (IS_ERR(regs)) 386 384 return PTR_ERR(regs); 387 385