Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

devres: support sizes greater than an unsigned long

As in 4f452e8aa492c0b8028ca9b4bdb4d018ba28c6c7, use resource_size_t
to accomodate sizes greater than the size of an unsigned long int on
platforms that have more than 32 bit physical addresses.

Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Cristian Stoica and committed by
Greg Kroah-Hartman
5559b7bc 5ebdc364

+4 -4
+2 -2
include/linux/io.h
··· 61 61 #define IOMEM_ERR_PTR(err) (__force void __iomem *)ERR_PTR(err) 62 62 63 63 void __iomem *devm_ioremap(struct device *dev, resource_size_t offset, 64 - unsigned long size); 64 + resource_size_t size); 65 65 void __iomem *devm_ioremap_nocache(struct device *dev, resource_size_t offset, 66 - unsigned long size); 66 + resource_size_t size); 67 67 void devm_iounmap(struct device *dev, void __iomem *addr); 68 68 int check_signature(const volatile void __iomem *io_addr, 69 69 const unsigned char *signature, int length);
+2 -2
lib/devres.c
··· 23 23 * Managed ioremap(). Map is automatically unmapped on driver detach. 24 24 */ 25 25 void __iomem *devm_ioremap(struct device *dev, resource_size_t offset, 26 - unsigned long size) 26 + resource_size_t size) 27 27 { 28 28 void __iomem **ptr, *addr; 29 29 ··· 52 52 * detach. 53 53 */ 54 54 void __iomem *devm_ioremap_nocache(struct device *dev, resource_size_t offset, 55 - unsigned long size) 55 + resource_size_t size) 56 56 { 57 57 void __iomem **ptr, *addr; 58 58