driver: Introduce dev_request_mem_resource
dev_request_mem_region returns a void * which shall be checked with
IS_ERR(), but in some cases the valid pointer returned clashes with
error values. This is especially the case on some Atmel SoCs.

This introduces dev_request_mem_resource which returns a struct resource
instead which in any case can be checked with IS_ERR(). It's the drivers
responsibility then to get the IOMEM pointer from the resource.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 8ee5479 commit fe7855bb4f2d82ac4559c46c586c2f29e9f123e2
@Sascha Hauer Sascha Hauer authored on 18 Feb 2016
Showing 2 changed files
View
drivers/base/driver.c
View
include/driver.h