Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <[email protected]>
---
sound/soc/bcm/bcm63xx-i2s-whistler.c | 16 +---------------
1 file changed, 1 insertion(+), 15 deletions(-)
diff --git a/sound/soc/bcm/bcm63xx-i2s-whistler.c b/sound/soc/bcm/bcm63xx-i2s-whistler.c
index 18c51dbbc8dc..c64609718738 100644
--- a/sound/soc/bcm/bcm63xx-i2s-whistler.c
+++ b/sound/soc/bcm/bcm63xx-i2s-whistler.c
@@ -225,7 +225,6 @@ static int bcm63xx_i2s_dev_probe(struct platform_device *pdev)
{
int ret = 0;
void __iomem *regs;
- struct resource *r_mem, *region;
struct bcm_i2s_priv *i2s_priv;
struct regmap *regmap_i2s;
struct clk *i2s_clk;
@@ -241,20 +240,7 @@ static int bcm63xx_i2s_dev_probe(struct platform_device *pdev)
return PTR_ERR(i2s_clk);
}
- r_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!r_mem) {
- dev_err(&pdev->dev, "Unable to get register resource.\n");
- return -ENODEV;
- }
-
- region = devm_request_mem_region(&pdev->dev, r_mem->start,
- resource_size(r_mem), DRV_NAME);
- if (!region) {
- dev_err(&pdev->dev, "Memory region already claimed\n");
- return -EBUSY;
- }
-
- regs = devm_ioremap_resource(&pdev->dev, r_mem);
+ regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(regs)) {
ret = PTR_ERR(regs);
return ret;
--
2.39.0
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <[email protected]>
---
sound/soc/mediatek/mt8186/mt8186-afe-pcm.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/mediatek/mt8186/mt8186-afe-pcm.c b/sound/soc/mediatek/mt8186/mt8186-afe-pcm.c
index a868a04ed4e7..b86159f70a33 100644
--- a/sound/soc/mediatek/mt8186/mt8186-afe-pcm.c
+++ b/sound/soc/mediatek/mt8186/mt8186-afe-pcm.c
@@ -2815,7 +2815,6 @@ static int mt8186_afe_pcm_dev_probe(struct platform_device *pdev)
{
struct mtk_base_afe *afe;
struct mt8186_afe_private *afe_priv;
- struct resource *res;
struct reset_control *rstc;
struct device *dev = &pdev->dev;
int i, ret, irq_id;
@@ -2836,8 +2835,7 @@ static int mt8186_afe_pcm_dev_probe(struct platform_device *pdev)
afe_priv = afe->platform_priv;
afe->dev = &pdev->dev;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- afe->base_addr = devm_ioremap_resource(dev, res);
+ afe->base_addr = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(afe->base_addr))
return PTR_ERR(afe->base_addr);
--
2.39.0
On Tue, 11 Jul 2023 11:48:41 +0800, Yangtao Li wrote:
> Use devm_platform_ioremap_resource() to simplify code.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/5] ASoC: bcm: bcm63xx-i2s-whistler: Convert to devm_platform_ioremap_resource()
commit: 7562539e15f1376577d7b62e904b509d17c4bc3f
[2/5] ASoC: ti: Convert to devm_platform_ioremap_resource_byname()
commit: c8b04f008fc33ab2b902a1780c205810d157c849
[3/5] ASoC: mediatek: mt8186: Convert to devm_platform_ioremap_resource()
commit: e1537b59633cc0e30305e498ba9eead45e762910
[4/5] ASoC: pxa: Use devm_platform_get_and_ioremap_resource()
commit: 97b19db1cfb34303101a3f30c26ef0e2ede07d89
[5/5] ASoC: tegra: tegra20_ac97: Use devm_platform_get_and_ioremap_resource()
commit: 976201dd5f597b7c25b9fc5ebeee382b5e6bf8fb
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark