[<prev] [next>] [day] [month] [year] [list]
Message-ID: <8f7cf483-6ab3-d00f-5606-863e9f5b31fc@web.de>
Date: Thu, 19 Sep 2019 17:38:04 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: alsa-devel@...a-project.org, linux-arm-kernel@...ts.infradead.org,
"Gustavo A. R. Silva" <gustavo@...eddedor.com>,
Jaroslav Kysela <perex@...ex.cz>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Maruthi Srinivas Bayyavarapu
<maruthi.srinivas.bayyavarapu@...inx.com>,
Michal Simek <michal.simek@...inx.com>,
Stephen Boyd <swboyd@...omium.org>,
Stephen Rothwell <sfr@...b.auug.org.au>,
Takashi Iwai <tiwai@...e.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: [PATCH] ASoC: xlnx: Use devm_platform_ioremap_resource() in
xlnx_formatter_pcm_probe()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Thu, 19 Sep 2019 17:27:57 +0200
Simplify this function implementation by using a known wrapper function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
sound/soc/xilinx/xlnx_formatter_pcm.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/sound/soc/xilinx/xlnx_formatter_pcm.c b/sound/soc/xilinx/xlnx_formatter_pcm.c
index 48970efe7838..fb652e73abeb 100644
--- a/sound/soc/xilinx/xlnx_formatter_pcm.c
+++ b/sound/soc/xilinx/xlnx_formatter_pcm.c
@@ -564,7 +564,6 @@ static int xlnx_formatter_pcm_probe(struct platform_device *pdev)
int ret;
u32 val;
struct xlnx_pcm_drv_data *aud_drv_data;
- struct resource *res;
struct device *dev = &pdev->dev;
aud_drv_data = devm_kzalloc(dev, sizeof(*aud_drv_data), GFP_KERNEL);
@@ -584,13 +583,7 @@ static int xlnx_formatter_pcm_probe(struct platform_device *pdev)
return ret;
}
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res) {
- dev_err(dev, "audio formatter node:addr to resource failed\n");
- ret = -ENXIO;
- goto clk_err;
- }
- aud_drv_data->mmio = devm_ioremap_resource(dev, res);
+ aud_drv_data->mmio = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(aud_drv_data->mmio)) {
dev_err(dev, "audio formatter ioremap failed\n");
ret = PTR_ERR(aud_drv_data->mmio);
--
2.23.0
Powered by blists - more mailing lists