diff options
author | Mark Brown <broonie@kernel.org> | 2021-06-21 20:16:54 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-06-21 20:16:54 +0200 |
commit | 439779ffd9096526e57994b118a3169c9ec57f72 (patch) | |
tree | 4577035cf74f70670662533e4905d250d89ea973 | |
parent | Merge series "ASoC: tidyup snd_soc_of_parse_daifmt()" from Kuninori Morimoto ... (diff) | |
parent | ASoC: fsl_xcvr: check return value after calling platform_get_resource_byname() (diff) | |
download | linux-439779ffd9096526e57994b118a3169c9ec57f72.tar.xz linux-439779ffd9096526e57994b118a3169c9ec57f72.zip |
Merge series "ASoC: fsl: Use devm_platform_get_and_ioremap_resource()" from Yang Yingliang <yangyingliang@huawei.com>:
patch #1 ~ #8:
Use devm_platform_get_and_ioremap_resource()
patch #9
check return value of platform_get_resource_byname()
v2:
change error message in patch #9
Yang Yingliang (9):
ASoC: fsl_asrc: Use devm_platform_get_and_ioremap_resource()
ASoC: fsl_aud2htx: Use devm_platform_get_and_ioremap_resource()
ASoC: fsl_easrc: Use devm_platform_get_and_ioremap_resource()
ASoC: fsl_esai: Use devm_platform_get_and_ioremap_resource()
ASoC: fsl_micfil: Use devm_platform_get_and_ioremap_resource()
ASoC: fsl_sai: Use devm_platform_get_and_ioremap_resource()
ASoC: fsl_spdif: Use devm_platform_get_and_ioremap_resource()
ASoC: fsl_ssi: Use devm_platform_get_and_ioremap_resource()
ASoC: fsl_xcvr: check return value after calling
platform_get_resource_byname()
sound/soc/fsl/fsl_asrc.c | 3 +--
sound/soc/fsl/fsl_aud2htx.c | 3 +--
sound/soc/fsl/fsl_easrc.c | 3 +--
sound/soc/fsl/fsl_esai.c | 3 +--
sound/soc/fsl/fsl_micfil.c | 3 +--
sound/soc/fsl/fsl_sai.c | 3 +--
sound/soc/fsl/fsl_spdif.c | 3 +--
sound/soc/fsl/fsl_ssi.c | 3 +--
sound/soc/fsl/fsl_xcvr.c | 4 ++++
9 files changed, 12 insertions(+), 16 deletions(-)
--
2.25.1
-rw-r--r-- | sound/soc/fsl/fsl_asrc.c | 3 | ||||
-rw-r--r-- | sound/soc/fsl/fsl_aud2htx.c | 3 | ||||
-rw-r--r-- | sound/soc/fsl/fsl_easrc.c | 3 | ||||
-rw-r--r-- | sound/soc/fsl/fsl_esai.c | 3 | ||||
-rw-r--r-- | sound/soc/fsl/fsl_micfil.c | 3 | ||||
-rw-r--r-- | sound/soc/fsl/fsl_sai.c | 3 | ||||
-rw-r--r-- | sound/soc/fsl/fsl_spdif.c | 3 | ||||
-rw-r--r-- | sound/soc/fsl/fsl_ssi.c | 3 | ||||
-rw-r--r-- | sound/soc/fsl/fsl_xcvr.c | 4 |
9 files changed, 12 insertions, 16 deletions
diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c index 0e1ad8efebd3..24b41881a68f 100644 --- a/sound/soc/fsl/fsl_asrc.c +++ b/sound/soc/fsl/fsl_asrc.c @@ -1035,8 +1035,7 @@ static int fsl_asrc_probe(struct platform_device *pdev) asrc->private = asrc_priv; /* Get the addresses and IRQ */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - regs = devm_ioremap_resource(&pdev->dev, res); + regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(regs)) return PTR_ERR(regs); diff --git a/sound/soc/fsl/fsl_aud2htx.c b/sound/soc/fsl/fsl_aud2htx.c index a328697511f7..99ab7f0241cf 100644 --- a/sound/soc/fsl/fsl_aud2htx.c +++ b/sound/soc/fsl/fsl_aud2htx.c @@ -196,8 +196,7 @@ static int fsl_aud2htx_probe(struct platform_device *pdev) aud2htx->pdev = pdev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - regs = devm_ioremap_resource(&pdev->dev, res); + regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(regs)) return PTR_ERR(regs); diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c index 25747433916e..be14f84796cb 100644 --- a/sound/soc/fsl/fsl_easrc.c +++ b/sound/soc/fsl/fsl_easrc.c @@ -1887,8 +1887,7 @@ static int fsl_easrc_probe(struct platform_device *pdev) easrc->private = easrc_priv; np = dev->of_node; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - regs = devm_ioremap_resource(dev, res); + regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(regs)) return PTR_ERR(regs); diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c index f356ae5925af..a961f837cd09 100644 --- a/sound/soc/fsl/fsl_esai.c +++ b/sound/soc/fsl/fsl_esai.c @@ -969,8 +969,7 @@ static int fsl_esai_probe(struct platform_device *pdev) esai_priv->soc = of_device_get_match_data(&pdev->dev); /* Get the addresses and IRQ */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - regs = devm_ioremap_resource(&pdev->dev, res); + regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(regs)) return PTR_ERR(regs); diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c index 3cf789ed6cbe..8c0c75ce9490 100644 --- a/sound/soc/fsl/fsl_micfil.c +++ b/sound/soc/fsl/fsl_micfil.c @@ -669,8 +669,7 @@ static int fsl_micfil_probe(struct platform_device *pdev) } /* init regmap */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - regs = devm_ioremap_resource(&pdev->dev, res); + regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(regs)) return PTR_ERR(regs); diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index 407a45e48eee..223fcd15bfcc 100644 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c @@ -1017,8 +1017,7 @@ static int fsl_sai_probe(struct platform_device *pdev) sai->is_lsb_first = of_property_read_bool(np, "lsb-first"); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&pdev->dev, res); + base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(base)) return PTR_ERR(base); diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c index 29cefd459241..2252a4a62fa5 100644 --- a/sound/soc/fsl/fsl_spdif.c +++ b/sound/soc/fsl/fsl_spdif.c @@ -1355,8 +1355,7 @@ static int fsl_spdif_probe(struct platform_device *pdev) spdif_priv->soc->tx_formats; /* Get the addresses and IRQ */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - regs = devm_ioremap_resource(&pdev->dev, res); + regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(regs)) return PTR_ERR(regs); diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 2b57b60431bb..ecbc1c365d5b 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -1503,8 +1503,7 @@ static int fsl_ssi_probe(struct platform_device *pdev) } ssi->cpu_dai_drv.name = dev_name(dev); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - iomem = devm_ioremap_resource(dev, res); + iomem = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(iomem)) return PTR_ERR(iomem); ssi->ssi_phys = res->start; diff --git a/sound/soc/fsl/fsl_xcvr.c b/sound/soc/fsl/fsl_xcvr.c index 92dd99258edf..fb7c29fc39d7 100644 --- a/sound/soc/fsl/fsl_xcvr.c +++ b/sound/soc/fsl/fsl_xcvr.c @@ -1202,6 +1202,10 @@ static int fsl_xcvr_probe(struct platform_device *pdev) rx_res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "rxfifo"); tx_res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "txfifo"); + if (!rx_res || !tx_res) { + dev_err(dev, "could not find rxfifo or txfifo resource\n"); + return -EINVAL; + } xcvr->dma_prms_rx.chan_name = "rx"; xcvr->dma_prms_tx.chan_name = "tx"; xcvr->dma_prms_rx.addr = rx_res->start; |