linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-kernel@vger.kernel.org,
	Russell King <linux@arm.linux.org.uk>,
	linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org
Subject: Re: [RFC 38/42] arch/arm/plat-omap: don't check resource with devm_ioremap_resource
Date: Fri, 10 May 2013 09:46:18 -0700	[thread overview]
Message-ID: <20130510164617.GK31554@atomide.com> (raw)
In-Reply-To: <1368173847-5661-39-git-send-email-wsa@the-dreams.de>

* Wolfram Sang <wsa@the-dreams.de> [130510 01:23]:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.
> 
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>

Acked-by: Tony Lindgren <tony@atomide.com>

> ---
>  arch/arm/plat-omap/dmtimer.c |    7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
> index 869254c..da1a3f7 100644
> --- a/arch/arm/plat-omap/dmtimer.c
> +++ b/arch/arm/plat-omap/dmtimer.c
> @@ -814,12 +814,6 @@ static int omap_dm_timer_probe(struct platform_device *pdev)
>  		return -ENODEV;
>  	}
>  
> -	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (unlikely(!mem)) {
> -		dev_err(dev, "%s: no memory resource.\n", __func__);
> -		return -ENODEV;
> -	}
> -
>  	timer = devm_kzalloc(dev, sizeof(struct omap_dm_timer), GFP_KERNEL);
>  	if (!timer) {
>  		dev_err(dev, "%s: memory alloc failed!\n", __func__);
> @@ -827,6 +821,7 @@ static int omap_dm_timer_probe(struct platform_device *pdev)
>  	}
>  
>  	timer->fclk = ERR_PTR(-ENODEV);
> +	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	timer->io_base = devm_ioremap_resource(dev, mem);
>  	if (IS_ERR(timer->io_base))
>  		return PTR_ERR(timer->io_base);
> -- 
> 1.7.10.4
> 

      reply	other threads:[~2013-05-10 16:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-10  8:16 [RFC 00/42] devm improvement series, part #1 Wolfram Sang
2013-05-10  8:16 ` [RFC 09/42] drivers/i2c/busses: don't check resource with devm_ioremap_resource Wolfram Sang
2013-05-11  5:18   ` Jingoo Han
2013-06-04 18:34   ` Kevin Hilman
2013-05-10  8:17 ` [RFC 33/42] drivers/video/omap2: " Wolfram Sang
2013-05-11  5:37   ` Jingoo Han
2013-05-10  8:17 ` [RFC 34/42] drivers/video/omap2/dss: " Wolfram Sang
2013-05-11  5:36   ` Jingoo Han
2013-05-10  8:17 ` [RFC 38/42] arch/arm/plat-omap: " Wolfram Sang
2013-05-10 16:46   ` Tony Lindgren [this message]

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=20130510164617.GK31554@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=wsa@the-dreams.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).