devres: support sizes greater than an unsigned long
As in 4f452e8aa4
, 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>
This commit is contained in:
parent
5ebdc36458
commit
5559b7bc42
2 changed files with 4 additions and 4 deletions
|
@ -61,9 +61,9 @@ static inline void devm_ioport_unmap(struct device *dev, void __iomem *addr)
|
||||||
#define IOMEM_ERR_PTR(err) (__force void __iomem *)ERR_PTR(err)
|
#define IOMEM_ERR_PTR(err) (__force void __iomem *)ERR_PTR(err)
|
||||||
|
|
||||||
void __iomem *devm_ioremap(struct device *dev, resource_size_t offset,
|
void __iomem *devm_ioremap(struct device *dev, resource_size_t offset,
|
||||||
unsigned long size);
|
resource_size_t size);
|
||||||
void __iomem *devm_ioremap_nocache(struct device *dev, resource_size_t offset,
|
void __iomem *devm_ioremap_nocache(struct device *dev, resource_size_t offset,
|
||||||
unsigned long size);
|
resource_size_t size);
|
||||||
void devm_iounmap(struct device *dev, void __iomem *addr);
|
void devm_iounmap(struct device *dev, void __iomem *addr);
|
||||||
int check_signature(const volatile void __iomem *io_addr,
|
int check_signature(const volatile void __iomem *io_addr,
|
||||||
const unsigned char *signature, int length);
|
const unsigned char *signature, int length);
|
||||||
|
|
|
@ -23,7 +23,7 @@ static int devm_ioremap_match(struct device *dev, void *res, void *match_data)
|
||||||
* Managed ioremap(). Map is automatically unmapped on driver detach.
|
* Managed ioremap(). Map is automatically unmapped on driver detach.
|
||||||
*/
|
*/
|
||||||
void __iomem *devm_ioremap(struct device *dev, resource_size_t offset,
|
void __iomem *devm_ioremap(struct device *dev, resource_size_t offset,
|
||||||
unsigned long size)
|
resource_size_t size)
|
||||||
{
|
{
|
||||||
void __iomem **ptr, *addr;
|
void __iomem **ptr, *addr;
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ EXPORT_SYMBOL(devm_ioremap);
|
||||||
* detach.
|
* detach.
|
||||||
*/
|
*/
|
||||||
void __iomem *devm_ioremap_nocache(struct device *dev, resource_size_t offset,
|
void __iomem *devm_ioremap_nocache(struct device *dev, resource_size_t offset,
|
||||||
unsigned long size)
|
resource_size_t size)
|
||||||
{
|
{
|
||||||
void __iomem **ptr, *addr;
|
void __iomem **ptr, *addr;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue