summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2015-01-06 12:37:06 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2015-01-08 08:07:58 +0100
commit40662bbb59f18b489c7e2c7c41612f1c16582d2e (patch)
treecb96cb4403c8430c3cafca0a5dc06b613c19c660 /arch/arm/mach-at91
parentc5151cae1789252cef6efd0720225ded81ae4620 (diff)
downloadbarebox-40662bbb59f18b489c7e2c7c41612f1c16582d2e.tar.gz
barebox-40662bbb59f18b489c7e2c7c41612f1c16582d2e.tar.xz
driver: workaroud resource request that conflicts with errno PTR
broken since commit ed6e965824303255cacc1c1a195d3684caa26bce Author: Sascha Hauer <s.hauer@pengutronix.de> resource: Let dev_request_mem_region return an error pointer Introduce dev_request_mem_region_err_null only used on platform like at91 where the resource address conflicts with errno PTR. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-at91')
-rw-r--r--arch/arm/mach-at91/at91sam926x_time.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/mach-at91/at91sam926x_time.c b/arch/arm/mach-at91/at91sam926x_time.c
index 789e1ec77e..cc7ad2f39a 100644
--- a/arch/arm/mach-at91/at91sam926x_time.c
+++ b/arch/arm/mach-at91/at91sam926x_time.c
@@ -89,9 +89,9 @@ static int at91_pit_probe(struct device_d *dev)
return ret;
}
- pit_base = dev_request_mem_region(dev, 0);
- if (IS_ERR(pit_base))
- return PTR_ERR(pit_base);
+ pit_base = dev_request_mem_region_err_null(dev, 0);
+ if (!pit_base)
+ return -ENOENT;
pit_rate = clk_get_rate(clk) / 16;