mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-02-05 02:38:20 +00:00
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>
This commit is contained in:
parent
1327bfe288
commit
0fb46f541b
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user