Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755160Ab3CLIR0 (ORCPT ); Tue, 12 Mar 2013 04:17:26 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:56662 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752880Ab3CLIRY (ORCPT ); Tue, 12 Mar 2013 04:17:24 -0400 Message-ID: <513EE454.5040302@ti.com> Date: Tue, 12 Mar 2013 09:16:20 +0100 From: Peter Ujfalusi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130301 Thunderbird/17.0.3 MIME-Version: 1.0 To: Silviu-Mihai Popescu CC: , , , , , , , Subject: Re: [PATCH] omap: convert to devm_ioremap_resource() References: <1363017537-11602-1-git-send-email-silviupopescu1990@gmail.com> In-Reply-To: <1363017537-11602-1-git-send-email-silviupopescu1990@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2535 Lines: 75 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 > --- > 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) > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/