aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/hpet.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/hpet.c')
-rw-r--r--arch/x86/kernel/hpet.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index 1bb0bf4d92cd..07b0a56a754d 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -32,8 +32,6 @@
32#define HPET_MIN_CYCLES 128 32#define HPET_MIN_CYCLES 128
33#define HPET_MIN_PROG_DELTA (HPET_MIN_CYCLES + (HPET_MIN_CYCLES >> 1)) 33#define HPET_MIN_PROG_DELTA (HPET_MIN_CYCLES + (HPET_MIN_CYCLES >> 1))
34 34
35#define EVT_TO_HPET_DEV(evt) container_of(evt, struct hpet_dev, evt)
36
37/* 35/*
38 * HPET address is set in acpi/boot.c, when an ACPI entry exists 36 * HPET address is set in acpi/boot.c, when an ACPI entry exists
39 */ 37 */
@@ -55,6 +53,11 @@ struct hpet_dev {
55 char name[10]; 53 char name[10];
56}; 54};
57 55
56inline struct hpet_dev *EVT_TO_HPET_DEV(struct clock_event_device *evtdev)
57{
58 return container_of(evtdev, struct hpet_dev, evt);
59}
60
58inline unsigned int hpet_readl(unsigned int a) 61inline unsigned int hpet_readl(unsigned int a)
59{ 62{
60 return readl(hpet_virt_address + a); 63 return readl(hpet_virt_address + a);