lkml.org 
[lkml]   [2010]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 11/15] Make x86 assembly ifdef guard more strict
Date
The 32-bit assembly is guarded by an #ifndef CONFIG_X86_64. Kconfig prevents
us from building this driver on !X86, so that happens to suffice - but we
should really lock it down to #ifdef CONFIG_X86_32.

Signed-off-by: dann frazier <dannf@hp.com>
---
drivers/watchdog/hpwdt.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
index a6b37fe..f46e4f2 100644
--- a/drivers/watchdog/hpwdt.c
+++ b/drivers/watchdog/hpwdt.c
@@ -136,7 +136,7 @@ static struct cmn_registers cmn_regs;
extern asmlinkage void asminline_call(struct cmn_registers *pi86Regs,
unsigned long *pRomEntry);

-#ifndef CONFIG_X86_64
+#ifdef CONFIG_X86_32
/* --32 Bit Bios------------------------------------------------------------ */

#define HPWDT_ARCH 32
@@ -325,8 +325,9 @@ static int __devinit detect_cru_service(void)
iounmap(p);
return rc;
}
-
-#else
+/* ------------------------------------------------------------------------- */
+#endif /* CONFIG_X86_32 */
+#ifdef CONFIG_X86_64
/* --64 Bit Bios------------------------------------------------------------ */

#define HPWDT_ARCH 64
@@ -404,10 +405,7 @@ static int __devinit detect_cru_service(void)
/* if cru_rom_addr has been set then we found a CRU service */
return ((cru_rom_addr != NULL) ? 0 : -ENODEV);
}
-
-/* ------------------------------------------------------------------------- */
-
-#endif
+#endif /* CONFIG_X86_64 */

/*
* Watchdog operations
--
1.7.1


\
 
 \ /
  Last update: 2010-07-28 01:57    [W:1.187 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site