From: Kumar Gala Date: Tue, 29 Apr 2008 15:25:48 +0000 (-0500) Subject: devres: support addresses greater than an unsigned long via dev_ioremap X-Git-Tag: v2.6.26-rc1~99^2~3 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f452e8aa492c0b8028ca9b4bdb4d018ba28c6c7;p=linux-2.6 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 Cc: Tejun Heo Cc: Jeff Garzik Signed-off-by: Greg Kroah-Hartman --- diff --git a/include/linux/io.h b/include/linux/io.h index e3b2dda6c8..3a03a3604c 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) } #endif -void __iomem * devm_ioremap(struct device *dev, unsigned long offset, +void __iomem *devm_ioremap(struct device *dev, resource_size_t offset, unsigned long size); -void __iomem * devm_ioremap_nocache(struct device *dev, unsigned long offset, +void __iomem *devm_ioremap_nocache(struct device *dev, resource_size_t offset, unsigned long size); void devm_iounmap(struct device *dev, void __iomem *addr); int check_signature(const volatile void __iomem *io_addr, diff --git a/lib/devres.c b/lib/devres.c index edc27a5d1b..26c87c49d7 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) * * Managed ioremap(). Map is automatically unmapped on driver detach. */ -void __iomem *devm_ioremap(struct device *dev, unsigned long offset, +void __iomem *devm_ioremap(struct device *dev, resource_size_t offset, unsigned long size) { void __iomem **ptr, *addr; @@ -49,7 +49,7 @@ EXPORT_SYMBOL(devm_ioremap); * Managed ioremap_nocache(). Map is automatically unmapped on driver * detach. */ -void __iomem *devm_ioremap_nocache(struct device *dev, unsigned long offset, +void __iomem *devm_ioremap_nocache(struct device *dev, resource_size_t offset, unsigned long size) { void __iomem **ptr, *addr;