From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
Cc: alsa-devel@alsa-project.org, tiwai@suse.de,
linux-kernel@vger.kernel.org,
broonie@opensource.wolfsonmicro.com, lgirdwood@gmail.com,
linux-omap@vger.kernel.org, jarkko.nikula@bitmer.com
Subject: Re: [PATCH] omap: convert to devm_ioremap_resource()
Date: Tue, 12 Mar 2013 09:16:20 +0100 [thread overview]
Message-ID: <513EE454.5040302@ti.com> (raw)
In-Reply-To: <1363017537-11602-1-git-send-email-silviupopescu1990@gmail.com>
Hi,
On 03/11/2013 04:58 PM, Silviu-Mihai Popescu wrote:
> Convert all uses of devm_request_and_ioremap() to the newly introduced
> devm_ioremap_resource() which provides more consistent error handling.
>
> devm_ioremap_resource() provides its own error messages so all explicit
> error messages can be removed from the failure code paths.
I believe both of the drivers has been patched for this:
omap-mcbpdm:
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-February/059484.html
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-February/059427.html
omap-dmic:
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-February/059485.html
and they should be already queued for next.
--
Péter
>
> Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
> ---
> sound/soc/omap/omap-dmic.c | 9 +++------
> sound/soc/omap/omap-mcpdm.c | 8 +++-----
> 2 files changed, 6 insertions(+), 11 deletions(-)
>
> diff --git a/sound/soc/omap/omap-dmic.c b/sound/soc/omap/omap-dmic.c
> index 77e9e7e..8ebaf11 100644
> --- a/sound/soc/omap/omap-dmic.c
> +++ b/sound/soc/omap/omap-dmic.c
> @@ -493,12 +493,9 @@ static int asoc_dmic_probe(struct platform_device *pdev)
> goto err_put_clk;
> }
>
> - dmic->io_base = devm_request_and_ioremap(&pdev->dev, res);
> - if (!dmic->io_base) {
> - dev_err(&pdev->dev, "cannot remap\n");
> - ret = -ENOMEM;
> - goto err_put_clk;
> - }
> + dmic->io_base = devm_ioremap_resource(&pdev->dev, res);
> + if (IS_ERR(dmic->io_base))
> + return PTR_ERR(dmic->io_base);
>
> ret = snd_soc_register_dai(&pdev->dev, &omap_dmic_dai);
> if (ret)
> diff --git a/sound/soc/omap/omap-mcpdm.c b/sound/soc/omap/omap-mcpdm.c
> index 079f277..ddfcc18 100644
> --- a/sound/soc/omap/omap-mcpdm.c
> +++ b/sound/soc/omap/omap-mcpdm.c
> @@ -464,11 +464,9 @@ static int asoc_mcpdm_probe(struct platform_device *pdev)
> if (res == NULL)
> return -ENOMEM;
>
> - mcpdm->io_base = devm_request_and_ioremap(&pdev->dev, res);
> - if (!mcpdm->io_base) {
> - dev_err(&pdev->dev, "cannot remap\n");
> - return -ENOMEM;
> - }
> + mcpdm->io_base = devm_ioremap_resource(&pdev->dev, res);
> + if (IS_ERR(mcpdm->io_base))
> + return PTR_ERR(mcpdm->io_base);
>
> mcpdm->irq = platform_get_irq(pdev, 0);
> if (mcpdm->irq < 0)
>
WARNING: multiple messages have this Message-ID (diff)
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
Cc: <linux-omap@vger.kernel.org>, <jarkko.nikula@bitmer.com>,
<lgirdwood@gmail.com>, <broonie@opensource.wolfsonmicro.com>,
<perex@perex.cz>, <tiwai@suse.de>, <alsa-devel@alsa-project.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] omap: convert to devm_ioremap_resource()
Date: Tue, 12 Mar 2013 09:16:20 +0100 [thread overview]
Message-ID: <513EE454.5040302@ti.com> (raw)
In-Reply-To: <1363017537-11602-1-git-send-email-silviupopescu1990@gmail.com>
Hi,
On 03/11/2013 04:58 PM, Silviu-Mihai Popescu wrote:
> Convert all uses of devm_request_and_ioremap() to the newly introduced
> devm_ioremap_resource() which provides more consistent error handling.
>
> devm_ioremap_resource() provides its own error messages so all explicit
> error messages can be removed from the failure code paths.
I believe both of the drivers has been patched for this:
omap-mcbpdm:
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-February/059484.html
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-February/059427.html
omap-dmic:
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-February/059485.html
and they should be already queued for next.
--
Péter
>
> Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
> ---
> sound/soc/omap/omap-dmic.c | 9 +++------
> sound/soc/omap/omap-mcpdm.c | 8 +++-----
> 2 files changed, 6 insertions(+), 11 deletions(-)
>
> diff --git a/sound/soc/omap/omap-dmic.c b/sound/soc/omap/omap-dmic.c
> index 77e9e7e..8ebaf11 100644
> --- a/sound/soc/omap/omap-dmic.c
> +++ b/sound/soc/omap/omap-dmic.c
> @@ -493,12 +493,9 @@ static int asoc_dmic_probe(struct platform_device *pdev)
> goto err_put_clk;
> }
>
> - dmic->io_base = devm_request_and_ioremap(&pdev->dev, res);
> - if (!dmic->io_base) {
> - dev_err(&pdev->dev, "cannot remap\n");
> - ret = -ENOMEM;
> - goto err_put_clk;
> - }
> + dmic->io_base = devm_ioremap_resource(&pdev->dev, res);
> + if (IS_ERR(dmic->io_base))
> + return PTR_ERR(dmic->io_base);
>
> ret = snd_soc_register_dai(&pdev->dev, &omap_dmic_dai);
> if (ret)
> diff --git a/sound/soc/omap/omap-mcpdm.c b/sound/soc/omap/omap-mcpdm.c
> index 079f277..ddfcc18 100644
> --- a/sound/soc/omap/omap-mcpdm.c
> +++ b/sound/soc/omap/omap-mcpdm.c
> @@ -464,11 +464,9 @@ static int asoc_mcpdm_probe(struct platform_device *pdev)
> if (res == NULL)
> return -ENOMEM;
>
> - mcpdm->io_base = devm_request_and_ioremap(&pdev->dev, res);
> - if (!mcpdm->io_base) {
> - dev_err(&pdev->dev, "cannot remap\n");
> - return -ENOMEM;
> - }
> + mcpdm->io_base = devm_ioremap_resource(&pdev->dev, res);
> + if (IS_ERR(mcpdm->io_base))
> + return PTR_ERR(mcpdm->io_base);
>
> mcpdm->irq = platform_get_irq(pdev, 0);
> if (mcpdm->irq < 0)
>
next prev parent reply other threads:[~2013-03-12 8:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-11 15:58 [PATCH] omap: convert to devm_ioremap_resource() Silviu-Mihai Popescu
2013-03-11 18:43 ` Jarkko Nikula
2013-03-12 8:16 ` Peter Ujfalusi [this message]
2013-03-12 8:16 ` Peter Ujfalusi
2013-03-12 8:24 ` Silviu Popescu
2013-03-12 8:32 ` Peter Ujfalusi
2013-03-12 8:32 ` Peter Ujfalusi
2013-03-12 8:32 ` Peter Ujfalusi
2013-03-12 8:32 ` Peter Ujfalusi
2013-03-12 18:44 ` 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=513EE454.5040302@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=jarkko.nikula@bitmer.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=silviupopescu1990@gmail.com \
--cc=tiwai@suse.de \
/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: link
Be 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.