* 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>
#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 *
}
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 *
return map->addr;
}
-void __init iounmap_fixed(void __iomem *addr)
+int iounmap_fixed(void __iomem *addr)
{
enum fixed_addresses idx;
unsigned long virt_addr;
}
}
+ /*
+ * If we don't match, it's not for us.
+ */
if (slot < 0)
- return;
+ return -EINVAL;
virt_addr = (unsigned long)addr;
map->size = 0;
map->addr = NULL;
+
+ return 0;
}