From 55ee2d30ce55df625daa45e823d633003dcdc12b Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Tue, 25 Oct 2011 15:16:47 +0200 Subject: lib: devres: add convenience function to remap a resource Almost every platform_driver does the three steps get_resource, request_mem_region, ioremap. This does not only lead to a lot of code duplication, but also a huge number of similar error strings and inconsistent error codes on failure. So, introduce a helper function which simplifies remapping a resource and make it hard to do something wrong and add documentation for it. Signed-off-by: Wolfram Sang Acked-by: Grant Likely Acked-by: Tejun Heo Signed-off-by: Greg Kroah-Hartman (cherry picked from mainline commit 72f8c0bfa0de64c68ee59f40eb9b2683bffffbb0) Change-Id: I600c5200104e234d42ca396e50853133b3ab4b1f Signed-off-by: Laxman Dewangan Reviewed-on: http://git-master/r/94533 Reviewed-by: Automatic_Commit_Validation_User --- Documentation/driver-model/devres.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'Documentation') diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver-model/devres.txt index d79aead9418b..10c64c8a13d4 100644 --- a/Documentation/driver-model/devres.txt +++ b/Documentation/driver-model/devres.txt @@ -262,6 +262,7 @@ IOMAP devm_ioremap() devm_ioremap_nocache() devm_iounmap() + devm_request_and_ioremap() : checks resource, requests region, ioremaps pcim_iomap() pcim_iounmap() pcim_iomap_table() : array of mapped addresses indexed by BAR -- cgit v1.2.3