Commit 77752839 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] added typechecking ot sparc64 ioremap()

ioremap() made inlined function on sparc64; that had caught one bogosity in
drivers, actually - cpwatchdog.c passed sizeof(structure that was never
declared) as the second argument to ioremap().  It went unnoticed since
that argument was never used in the body of macro, so it disappeared without
a trace...
Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 5ce4d219
......@@ -743,7 +743,7 @@ static int __init wd_init(void)
}
wd_dev.regs =
ioremap(edev->resource[0].start, sizeof(struct wd_regblk));
ioremap(edev->resource[0].start, 4 * WD_TIMER_REGSZ); /* ? */
if(NULL == wd_dev.regs) {
printk("%s: unable to map registers\n", WD_OBPNAME);
......
......@@ -444,9 +444,16 @@ static inline int check_signature(unsigned long io_addr,
/* On sparc64 we have the whole physical IO address space accessible
* using physically addressed loads and stores, so this does nothing.
*/
#define ioremap(__offset, __size) ((void __iomem *)(__offset))
static inline void __iomem *ioremap(unsigned long offset, unsigned long size)
{
return (void __iomem *)offset;
}
#define ioremap_nocache(X,Y) ioremap((X),(Y))
#define iounmap(__addr) do { (void)(__addr); } while(0)
static inline void iounmap(void __iomem *addr)
{
}
#define ioread8(X) readb(X)
#define ioread16(X) readw(X)
......
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