Commit e8e507a8 authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by Jakub Kicinski

soc: fsl: qe: make cpm_muram_offset take a const void* argument

Allow passing const-qualified pointers without requiring a cast in the
caller.
Signed-off-by: default avatarRasmus Villemoes <rasmus.villemoes@prevas.dk>
Acked-by: default avatarLi Yang <leoyang.li@nxp.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 0a950ce0
...@@ -223,7 +223,7 @@ void __iomem *cpm_muram_addr(unsigned long offset) ...@@ -223,7 +223,7 @@ void __iomem *cpm_muram_addr(unsigned long offset)
} }
EXPORT_SYMBOL(cpm_muram_addr); EXPORT_SYMBOL(cpm_muram_addr);
unsigned long cpm_muram_offset(void __iomem *addr) unsigned long cpm_muram_offset(const void __iomem *addr)
{ {
return addr - (void __iomem *)muram_vbase; return addr - (void __iomem *)muram_vbase;
} }
......
...@@ -102,7 +102,7 @@ s32 cpm_muram_alloc(unsigned long size, unsigned long align); ...@@ -102,7 +102,7 @@ s32 cpm_muram_alloc(unsigned long size, unsigned long align);
void cpm_muram_free(s32 offset); void cpm_muram_free(s32 offset);
s32 cpm_muram_alloc_fixed(unsigned long offset, unsigned long size); s32 cpm_muram_alloc_fixed(unsigned long offset, unsigned long size);
void __iomem *cpm_muram_addr(unsigned long offset); void __iomem *cpm_muram_addr(unsigned long offset);
unsigned long cpm_muram_offset(void __iomem *addr); unsigned long cpm_muram_offset(const void __iomem *addr);
dma_addr_t cpm_muram_dma(void __iomem *addr); dma_addr_t cpm_muram_dma(void __iomem *addr);
#else #else
static inline s32 cpm_muram_alloc(unsigned long size, static inline s32 cpm_muram_alloc(unsigned long size,
...@@ -126,7 +126,7 @@ static inline void __iomem *cpm_muram_addr(unsigned long offset) ...@@ -126,7 +126,7 @@ static inline void __iomem *cpm_muram_addr(unsigned long offset)
return NULL; return NULL;
} }
static inline unsigned long cpm_muram_offset(void __iomem *addr) static inline unsigned long cpm_muram_offset(const void __iomem *addr)
{ {
return -ENOSYS; return -ENOSYS;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment