diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-07-27 23:07:16 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-07-31 12:06:18 +0100 |
commit | 0fb46f541bb3e6e5bbb155c08b9e75f92c21acb9 (patch) | |
tree | 3cd402bf1eeb04fe82aa14538a1e761c66df73c7 | |
parent | 1327bfe2887c0e29bcdc0c5c3e445da107ccb4e2 (diff) | |
download | linux-stable-0fb46f541bb3e6e5bbb155c08b9e75f92c21acb9.tar.gz linux-stable-0fb46f541bb3e6e5bbb155c08b9e75f92c21acb9.tar.bz2 linux-stable-0fb46f541bb3e6e5bbb155c08b9e75f92c21acb9.zip |
ASoC: spear: 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-13-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/spear/spdif_in.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/spear/spdif_in.c b/sound/soc/spear/spdif_in.c index 78a6a360b4a6..4b68d6ee75da 100644 --- a/sound/soc/spear/spdif_in.c +++ b/sound/soc/spear/spdif_in.c @@ -202,12 +202,11 @@ static int spdif_in_probe(struct platform_device *pdev) { struct spdif_in_dev *host; struct spear_spdif_platform_data *pdata; - struct resource *res, *res_fifo; + struct resource *res_fifo; void __iomem *io_base; int ret; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - io_base = devm_ioremap_resource(&pdev->dev, res); + io_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(io_base)) return PTR_ERR(io_base); |