public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: tony@atomide•com (Tony Lindgren)
To: linux-arm-kernel@lists•infradead.org
Subject: [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
> 

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

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1368173847-5661-1-git-send-email-wsa@the-dreams.de>
     [not found] ` <1368173847-5661-24-git-send-email-wsa@the-dreams.de>
2013-05-10 10:55   ` [RFC 23/42] drivers/spi: don't check resource with devm_ioremap_resource Mark Brown
2013-05-10 16:37   ` Stephen Warren
2013-05-11  5:24   ` Jingoo Han
     [not found] ` <1368173847-5661-19-git-send-email-wsa@the-dreams.de>
2013-05-10 14:30   ` [RFC 18/42] drivers/pinctrl: " Jean-Christophe PLAGNIOL-VILLARD
2013-05-14 12:19   ` Linus Walleij
2013-06-06  8:43   ` Jean-Christophe PLAGNIOL-VILLARD
     [not found] ` <1368173847-5661-39-git-send-email-wsa@the-dreams.de>
2013-05-10 16:46   ` Tony Lindgren [this message]
     [not found] ` <1368173847-5661-40-git-send-email-wsa@the-dreams.de>
2013-05-11  5:15   ` [RFC 39/42] arch/arm/plat-samsung: " Jingoo Han
     [not found] ` <1368173847-5661-10-git-send-email-wsa@the-dreams.de>
2013-05-11  5:18   ` [RFC 09/42] drivers/i2c/busses: " Jingoo Han
2013-06-04 18:34   ` Kevin Hilman
     [not found] ` <1368173847-5661-23-git-send-email-wsa@the-dreams.de>
2013-05-12 15:11   ` [RFC 22/42] drivers/rtc: " Viresh Kumar
     [not found] ` <1368173847-5661-21-git-send-email-wsa@the-dreams.de>
2013-05-12 15:12   ` [RFC 20/42] drivers/pwm: " Viresh Kumar
     [not found] ` <1368173847-5661-20-git-send-email-wsa@the-dreams.de>
2013-05-12 15:10   ` [RFC 19/42] drivers/pinctrl/spear: " Viresh Kumar
2013-05-14 12:56   ` Linus Walleij

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$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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