Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dmi: clean-up dmi helper declarations

The declaration of dmi helper functions is a bit messy and inconsistent at the
moment:

* On ia64 they are declared in <asm/io.h>.
* On x86-64 they are declared in <asm/dmi.h>.
* On i386 they are declared both in <asm/io.h> and <asm/dmi.h>.

Fix the header files so that the dmi helper functions are consistently
defined in <asm/dmi.h>.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Jean Delvare and committed by
Linus Torvalds
ef3fb66c 99da9047

+6 -10
+5
include/asm-ia64/dmi.h
··· 3 3 4 4 #include <asm/io.h> 5 5 6 + /* Use normal IO mappings for DMI */ 7 + #define dmi_ioremap ioremap 8 + #define dmi_iounmap(x,l) iounmap(x) 9 + #define dmi_alloc(l) kmalloc(l, GFP_ATOMIC) 10 + 6 11 #endif
-5
include/asm-ia64/io.h
··· 423 423 extern void __iomem * ioremap_nocache (unsigned long offset, unsigned long size); 424 424 extern void iounmap (volatile void __iomem *addr); 425 425 426 - /* Use normal IO mappings for DMI */ 427 - #define dmi_ioremap ioremap 428 - #define dmi_iounmap(x,l) iounmap(x) 429 - #define dmi_alloc(l) kmalloc(l, GFP_ATOMIC) 430 - 431 426 /* 432 427 * String version of IO memory access ops: 433 428 */
+1
include/asm-x86/dmi.h
··· 27 27 28 28 #endif 29 29 30 + /* Use early IO mappings for DMI because it's initialized early */ 30 31 #define dmi_ioremap early_ioremap 31 32 #define dmi_iounmap early_iounmap 32 33
-5
include/asm-x86/io_32.h
··· 133 133 extern void early_iounmap(void *addr, unsigned long size); 134 134 extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys); 135 135 136 - /* Use early IO mappings for DMI because it's initialized early */ 137 - #define dmi_ioremap early_ioremap 138 - #define dmi_iounmap early_iounmap 139 - #define dmi_alloc alloc_bootmem 140 - 141 136 /* 142 137 * ISA I/O bus memory addresses are 1:1 with the physical address. 143 138 */