diff options
author | Ingo Molnar <mingo@kernel.org> | 2014-11-12 09:09:01 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-11-12 09:09:01 -0500 |
commit | 890ca861f868a10617029ffc87eae7d48ea6876c (patch) | |
tree | 713383f4e3bbd94ddb9816a25e6b3911511908f1 /lib/devres.c | |
parent | 03452d27c6cd9cebb59a6bb0fb6bd8557916c263 (diff) | |
parent | 206c5f60a3d902bc4b56dab2de3e88de5eb06108 (diff) |
Merge tag 'v3.18-rc4' into x86/cleanups, to refresh the tree before pulling new changes.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'lib/devres.c')
-rw-r--r-- | lib/devres.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/lib/devres.c b/lib/devres.c index f562bf6ff71d..f4a195a6efe4 100644 --- a/lib/devres.c +++ b/lib/devres.c | |||
@@ -86,8 +86,6 @@ void devm_iounmap(struct device *dev, void __iomem *addr) | |||
86 | } | 86 | } |
87 | EXPORT_SYMBOL(devm_iounmap); | 87 | EXPORT_SYMBOL(devm_iounmap); |
88 | 88 | ||
89 | #define IOMEM_ERR_PTR(err) (__force void __iomem *)ERR_PTR(err) | ||
90 | |||
91 | /** | 89 | /** |
92 | * devm_ioremap_resource() - check, request region, and ioremap resource | 90 | * devm_ioremap_resource() - check, request region, and ioremap resource |
93 | * @dev: generic device to handle the resource for | 91 | * @dev: generic device to handle the resource for |
@@ -142,34 +140,6 @@ void __iomem *devm_ioremap_resource(struct device *dev, struct resource *res) | |||
142 | } | 140 | } |
143 | EXPORT_SYMBOL(devm_ioremap_resource); | 141 | EXPORT_SYMBOL(devm_ioremap_resource); |
144 | 142 | ||
145 | /** | ||
146 | * devm_request_and_ioremap() - Check, request region, and ioremap resource | ||
147 | * @dev: Generic device to handle the resource for | ||
148 | * @res: resource to be handled | ||
149 | * | ||
150 | * Takes all necessary steps to ioremap a mem resource. Uses managed device, so | ||
151 | * everything is undone on driver detach. Checks arguments, so you can feed | ||
152 | * it the result from e.g. platform_get_resource() directly. Returns the | ||
153 | * remapped pointer or NULL on error. Usage example: | ||
154 | * | ||
155 | * res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
156 | * base = devm_request_and_ioremap(&pdev->dev, res); | ||
157 | * if (!base) | ||
158 | * return -EADDRNOTAVAIL; | ||
159 | */ | ||
160 | void __iomem *devm_request_and_ioremap(struct device *dev, | ||
161 | struct resource *res) | ||
162 | { | ||
163 | void __iomem *dest_ptr; | ||
164 | |||
165 | dest_ptr = devm_ioremap_resource(dev, res); | ||
166 | if (IS_ERR(dest_ptr)) | ||
167 | return NULL; | ||
168 | |||
169 | return dest_ptr; | ||
170 | } | ||
171 | EXPORT_SYMBOL(devm_request_and_ioremap); | ||
172 | |||
173 | #ifdef CONFIG_HAS_IOPORT_MAP | 143 | #ifdef CONFIG_HAS_IOPORT_MAP |
174 | /* | 144 | /* |
175 | * Generic iomap devres | 145 | * Generic iomap devres |