diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2008-04-29 11:25:48 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-04-30 19:52:48 -0400 |
commit | 4f452e8aa492c0b8028ca9b4bdb4d018ba28c6c7 (patch) | |
tree | 9838a71adc6c9297bbedafc6ad2f2b36543fd0df | |
parent | a4ca6617421188f50774780cdc91c3782b7d08fe (diff) |
devres: support addresses greater than an unsigned long via dev_ioremap
Use a resource_size_t instead of unsigned long since some arch's are
capable of having ioremap deal with addresses greater than the size of a
unsigned long.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Cc: Tejun Heo <htejun@gmail.com>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | include/linux/io.h | 4 | ||||
-rw-r--r-- | lib/devres.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/io.h b/include/linux/io.h index e3b2dda6c8eb..3a03a3604cce 100644 --- a/include/linux/io.h +++ b/include/linux/io.h | |||
@@ -58,9 +58,9 @@ static inline void devm_ioport_unmap(struct device *dev, void __iomem *addr) | |||
58 | } | 58 | } |
59 | #endif | 59 | #endif |
60 | 60 | ||
61 | void __iomem * devm_ioremap(struct device *dev, unsigned long offset, | 61 | void __iomem *devm_ioremap(struct device *dev, resource_size_t offset, |
62 | unsigned long size); | 62 | unsigned long size); |
63 | void __iomem * devm_ioremap_nocache(struct device *dev, unsigned long offset, | 63 | void __iomem *devm_ioremap_nocache(struct device *dev, resource_size_t offset, |
64 | unsigned long size); | 64 | unsigned long size); |
65 | void devm_iounmap(struct device *dev, void __iomem *addr); | 65 | void devm_iounmap(struct device *dev, void __iomem *addr); |
66 | int check_signature(const volatile void __iomem *io_addr, | 66 | int check_signature(const volatile void __iomem *io_addr, |
diff --git a/lib/devres.c b/lib/devres.c index edc27a5d1b73..26c87c49d776 100644 --- a/lib/devres.c +++ b/lib/devres.c | |||
@@ -20,7 +20,7 @@ static int devm_ioremap_match(struct device *dev, void *res, void *match_data) | |||
20 | * | 20 | * |
21 | * Managed ioremap(). Map is automatically unmapped on driver detach. | 21 | * Managed ioremap(). Map is automatically unmapped on driver detach. |
22 | */ | 22 | */ |
23 | void __iomem *devm_ioremap(struct device *dev, unsigned long offset, | 23 | void __iomem *devm_ioremap(struct device *dev, resource_size_t offset, |
24 | unsigned long size) | 24 | unsigned long size) |
25 | { | 25 | { |
26 | void __iomem **ptr, *addr; | 26 | void __iomem **ptr, *addr; |
@@ -49,7 +49,7 @@ EXPORT_SYMBOL(devm_ioremap); | |||
49 | * Managed ioremap_nocache(). Map is automatically unmapped on driver | 49 | * Managed ioremap_nocache(). Map is automatically unmapped on driver |
50 | * detach. | 50 | * detach. |
51 | */ | 51 | */ |
52 | void __iomem *devm_ioremap_nocache(struct device *dev, unsigned long offset, | 52 | void __iomem *devm_ioremap_nocache(struct device *dev, resource_size_t offset, |
53 | unsigned long size) | 53 | unsigned long size) |
54 | { | 54 | { |
55 | void __iomem **ptr, *addr; | 55 | void __iomem **ptr, *addr; |