[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1368173847-5661-39-git-send-email-wsa@the-dreams.de>
Date: Fri, 10 May 2013 10:17:23 +0200
From: Wolfram Sang <wsa@...-dreams.de>
To: linux-kernel@...r.kernel.org
Cc: Wolfram Sang <wsa@...-dreams.de>, Tony Lindgren <tony@...mide.com>,
Russell King <linux@....linux.org.uk>,
linux-arm-kernel@...ts.infradead.org, linux-omap@...r.kernel.org
Subject: [RFC 38/42] arch/arm/plat-omap: don't check resource with devm_ioremap_resource
devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.
Signed-off-by: Wolfram Sang <wsa@...-dreams.de>
---
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists