Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 181107
b: refs/heads/master
c: 4f744af
h: refs/heads/master
i:
  181105: 59eb252
  181103: 15a9caf
v: v3
  • Loading branch information
Paul Mundt committed Jan 18, 2010
1 parent b0df56c commit e011754
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0b59e38ffaf7b201ff6afe5b736365d16848c7e3
refs/heads/master: 4f744affc345f8b158615e0cdd01d1f4985837c3
5 changes: 3 additions & 2 deletions trunk/arch/sh/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* for old compat code for I/O offseting to SuperIOs, all of which are
* better handled through the machvec ioport mapping routines these days.
*/
#include <linux/errno.h>
#include <asm/cache.h>
#include <asm/system.h>
#include <asm/addrspace.h>
Expand Down Expand Up @@ -239,7 +240,7 @@ void __iounmap(void __iomem *addr);

#ifdef CONFIG_IOREMAP_FIXED
extern void __iomem *ioremap_fixed(resource_size_t, unsigned long, pgprot_t);
extern void iounmap_fixed(void __iomem *);
extern int iounmap_fixed(void __iomem *);
extern void ioremap_fixed_init(void);
#else
static inline void __iomem *
Expand All @@ -249,7 +250,7 @@ ioremap_fixed(resource_size t phys_addr, unsigned long size, pgprot_t prot)
}

static inline void ioremap_fixed_init(void) { }
static inline void iounmap_fixed(void __iomem *addr) { }
static inline int iounmap_fixed(void __iomem *addr) { return -EINVAL; }
#endif

static inline void __iomem *
Expand Down
9 changes: 7 additions & 2 deletions trunk/arch/sh/mm/ioremap_fixed.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ ioremap_fixed(resource_size_t phys_addr, unsigned long size, pgprot_t prot)
return map->addr;
}

void __init iounmap_fixed(void __iomem *addr)
int iounmap_fixed(void __iomem *addr)
{
enum fixed_addresses idx;
unsigned long virt_addr;
Expand All @@ -122,8 +122,11 @@ void __init iounmap_fixed(void __iomem *addr)
}
}

/*
* If we don't match, it's not for us.
*/
if (slot < 0)
return;
return -EINVAL;

virt_addr = (unsigned long)addr;

Expand All @@ -141,4 +144,6 @@ void __init iounmap_fixed(void __iomem *addr)

map->size = 0;
map->addr = NULL;

return 0;
}

0 comments on commit e011754

Please sign in to comment.