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 /drivers/pinctrl | |
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 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/pinctrl-at91.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c index 0d6d2e7e53..b803f891eb 100644 --- a/drivers/pinctrl/pinctrl-at91.c +++ b/drivers/pinctrl/pinctrl-at91.c @@ -652,9 +652,9 @@ static int at91_gpio_probe(struct device_d *dev) } gpio_banks = max(gpio_banks, alias_idx + 1); - at91_gpio->regbase = dev_request_mem_region(dev, 0); - if (IS_ERR(at91_gpio->regbase)) - return PTR_ERR(at91_gpio->regbase); + at91_gpio->regbase = dev_request_mem_region_err_null(dev, 0); + if (!at91_gpio->regbase) + return -ENOENT; at91_gpio->chip.ops = &at91_gpio_ops; at91_gpio->chip.ngpio = MAX_NB_GPIO_PER_BANK; |