From: Yang Yingliang <yangyingliang@huawei.com> To: <linux-kernel@vger.kernel.org>, <alsa-devel@alsa-project.org> Cc: <lgirdwood@gmail.com>, <broonie@kernel.org>, <srinivas.kandagatla@linaro.org> Subject: [PATCH -next 1/2] ASoC: qcom: apq8016_sbc: Use devm_platform_get_and_ioremap_resource() Date: Tue, 15 Jun 2021 22:07:10 +0800 [thread overview] Message-ID: <20210615140711.1676704-1-yangyingliang@huawei.com> (raw) Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- sound/soc/qcom/apq8016_sbc.c | 7 ++----- 1 file 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); -- 2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: Yang Yingliang <yangyingliang@huawei.com> To: <linux-kernel@vger.kernel.org>, <alsa-devel@alsa-project.org> Cc: broonie@kernel.org, lgirdwood@gmail.com Subject: [PATCH -next 1/2] ASoC: qcom: apq8016_sbc: Use devm_platform_get_and_ioremap_resource() Date: Tue, 15 Jun 2021 22:07:10 +0800 [thread overview] Message-ID: <20210615140711.1676704-1-yangyingliang@huawei.com> (raw) Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- sound/soc/qcom/apq8016_sbc.c | 7 ++----- 1 file 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); -- 2.25.1
next reply other threads:[~2021-06-15 14:03 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-06-15 14:07 Yang Yingliang [this message] 2021-06-15 14:07 ` [PATCH -next 1/2] ASoC: qcom: apq8016_sbc: Use devm_platform_get_and_ioremap_resource() Yang Yingliang 2021-06-15 14:07 ` [PATCH -next 2/2] ASoC: qcom: lpass-cpu: " Yang Yingliang 2021-06-15 14:07 ` Yang Yingliang 2021-06-21 18:46 ` [PATCH -next 1/2] ASoC: qcom: apq8016_sbc: " Mark Brown 2021-06-21 18:46 ` Mark Brown
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210615140711.1676704-1-yangyingliang@huawei.com \ --to=yangyingliang@huawei.com \ --cc=alsa-devel@alsa-project.org \ --cc=broonie@kernel.org \ --cc=lgirdwood@gmail.com \ --cc=linux-kernel@vger.kernel.org \ --cc=srinivas.kandagatla@linaro.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.