diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2021-06-15 22:07:10 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-06-21 13:06:25 +0100 |
commit | e6bb518199181c9c35827a48142fbb548125d0b0 (patch) | |
tree | d23a3c70242f311d6a9da1b4e3050a268442d46c /sound/soc | |
parent | 683b0df26c3333a5c020a2764b71a70d082c1c61 (diff) | |
download | linux-e6bb518199181c9c35827a48142fbb548125d0b0.tar.bz2 |
ASoC: qcom: apq8016_sbc: Use devm_platform_get_and_ioremap_resource()
Use devm_platform_get_and_ioremap_resource() to simplify
code.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210615140711.1676704-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/qcom/apq8016_sbc.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sound/soc/qcom/apq8016_sbc.c b/sound/soc/qcom/apq8016_sbc.c index 270986b2f102..08a05f0ecad7 100644 --- a/sound/soc/qcom/apq8016_sbc.c +++ b/sound/soc/qcom/apq8016_sbc.c @@ -134,7 +134,6 @@ static int apq8016_sbc_platform_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct snd_soc_card *card; struct apq8016_sbc_data *data; - struct resource *res; int ret; data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL); @@ -151,13 +150,11 @@ static int apq8016_sbc_platform_probe(struct platform_device *pdev) if (ret) return ret; - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mic-iomux"); - data->mic_iomux = devm_ioremap_resource(dev, res); + data->mic_iomux = devm_platform_ioremap_resource_byname(pdev, "mic-iomux"); if (IS_ERR(data->mic_iomux)) return PTR_ERR(data->mic_iomux); - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "spkr-iomux"); - data->spkr_iomux = devm_ioremap_resource(dev, res); + data->spkr_iomux = devm_platform_ioremap_resource_byname(pdev, "spkr-iomux"); if (IS_ERR(data->spkr_iomux)) return PTR_ERR(data->spkr_iomux); |