Skip to content

Commit

Permalink
[MIPS] Fix iounmap argument to const volatile.
Browse files Browse the repository at this point in the history
With the existing prototype the following code:

    const void __iomem *io = ioremap();
    x = readb(io);
    iounmap(io);

did result in a warning.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Ralf Baechle committed Oct 19, 2006
1 parent d2bcf87 commit d89e36d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion arch/mips/mm/ioremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ void __iomem * __ioremap(phys_t phys_addr, phys_t size, unsigned long flags)

#define IS_KSEG1(addr) (((unsigned long)(addr) & ~0x1fffffffUL) == CKSEG1)

void __iounmap(volatile void __iomem *addr)
void __iounmap(const volatile void __iomem *addr)
{
struct vm_struct *p;

Expand Down
4 changes: 2 additions & 2 deletions include/asm-mips/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ extern unsigned long isa_slot_offset;
#define page_to_phys(page) ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT)

extern void __iomem * __ioremap(phys_t offset, phys_t size, unsigned long flags);
extern void __iounmap(volatile void __iomem *addr);
extern void __iounmap(const volatile void __iomem *addr);

static inline void __iomem * __ioremap_mode(phys_t offset, unsigned long size,
unsigned long flags)
Expand Down Expand Up @@ -279,7 +279,7 @@ static inline void __iomem * __ioremap_mode(phys_t offset, unsigned long size,
#define ioremap_uncached_accelerated(offset, size) \
__ioremap_mode((offset), (size), _CACHE_UNCACHED_ACCELERATED)

static inline void iounmap(volatile void __iomem *addr)
static inline void iounmap(const volatile void __iomem *addr)
{
#define __IS_KSEG1(addr) (((unsigned long)(addr) & ~0x1fffffffUL) == CKSEG1)

Expand Down

0 comments on commit d89e36d

Please sign in to comment.