diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2015-01-06 12:37:06 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-01-08 08:07:58 +0100 |
commit | 40662bbb59f18b489c7e2c7c41612f1c16582d2e (patch) | |
tree | cb96cb4403c8430c3cafca0a5dc06b613c19c660 /include/driver.h | |
parent | c5151cae1789252cef6efd0720225ded81ae4620 (diff) | |
download | barebox-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 'include/driver.h')
-rw-r--r-- | include/driver.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/driver.h b/include/driver.h index 53e1000067..46aae4f433 100644 --- a/include/driver.h +++ b/include/driver.h @@ -206,6 +206,14 @@ void *dev_get_mem_region(struct device_d *dev, int num); */ void __iomem *dev_request_mem_region(struct device_d *dev, int num); +/* + * exlusively request register base 'num' for a device + * will return NULL on error + * only used on platform like at91 where the Ressource address collision with + * PTR errno + */ +void __iomem *dev_request_mem_region_err_null(struct device_d *dev, int num); + struct device_d *device_alloc(const char *devname, int id); int device_add_resources(struct device_d *dev, const struct resource *res, int num); |