aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/dmi.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-x86/dmi.h')
-rw-r--r--include/asm-x86/dmi.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/include/asm-x86/dmi.h b/include/asm-x86/dmi.h
index 8e2b0e6aa8e7..1241e6ad1935 100644
--- a/include/asm-x86/dmi.h
+++ b/include/asm-x86/dmi.h
@@ -5,9 +5,6 @@
5 5
6#ifdef CONFIG_X86_32 6#ifdef CONFIG_X86_32
7 7
8/* Use early IO mappings for DMI because it's initialized early */
9#define dmi_ioremap bt_ioremap
10#define dmi_iounmap bt_iounmap
11#define dmi_alloc alloc_bootmem 8#define dmi_alloc alloc_bootmem
12 9
13#else /* CONFIG_X86_32 */ 10#else /* CONFIG_X86_32 */
@@ -22,14 +19,15 @@ extern char dmi_alloc_data[DMI_MAX_DATA];
22static inline void *dmi_alloc(unsigned len) 19static inline void *dmi_alloc(unsigned len)
23{ 20{
24 int idx = dmi_alloc_index; 21 int idx = dmi_alloc_index;
25 if ((dmi_alloc_index += len) > DMI_MAX_DATA) 22 if ((dmi_alloc_index + len) > DMI_MAX_DATA)
26 return NULL; 23 return NULL;
24 dmi_alloc_index += len;
27 return dmi_alloc_data + idx; 25 return dmi_alloc_data + idx;
28} 26}
29 27
28#endif
29
30#define dmi_ioremap early_ioremap 30#define dmi_ioremap early_ioremap
31#define dmi_iounmap early_iounmap 31#define dmi_iounmap early_iounmap
32 32
33#endif 33#endif
34
35#endif