public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] Fix hpet wrong values
@ 2007-11-27 12:23 Pavel Machek
  2007-11-28  2:53 ` Andrew Morton
  2007-11-28 10:38 ` Ingo Molnar
  0 siblings, 2 replies; 5+ messages in thread
From: Pavel Machek @ 2007-11-27 12:23 UTC (permalink / raw)
  To: Thomas Gleixner, kernel list, Ingo Molnar, Andrew Morton

If hpet is not enabled in config, its init should not pretend to work,
and people should not try to get time from it. 

Signed-off-by: Pavel Machek <pavel@suse.cz>

diff --git a/include/asm-x86/hpet.h b/include/asm-x86/hpet.h
index b1f3c1e..1777d68 100644
--- a/include/asm-x86/hpet.h
+++ b/include/asm-x86/hpet.h
@@ -81,8 +81,8 @@ #endif /* CONFIG_HPET_EMULATE_RTC */
 
 #else
 
-static inline int hpet_enable(void) { return 0; }
-static inline unsigned long hpet_readl(unsigned long a) { return 0; }
+static inline int hpet_enable(void) { return -ENODEV; }
+static inline unsigned long hpet_readl(unsigned long a) { BUG(); }
 
 #endif /* CONFIG_HPET_TIMER */
 #endif /* ASM_X86_HPET_H */

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-11-28 21:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-27 12:23 [patch] Fix hpet wrong values Pavel Machek
2007-11-28  2:53 ` Andrew Morton
2007-11-28 10:38 ` Ingo Molnar
2007-11-28 10:40   ` Ingo Molnar
2007-11-28 21:45     ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox