Patchwork [2/3] kvm tools: Include RTC headers directly

login
register
mail settings
Submitter Sasha Levin
Date Nov. 29, 2011, 8:35 a.m.
Message ID <1322555735-32163-2-git-send-email-levinsasha928@gmail.com>
Download mbox | patch
Permalink /patch/128234/
State New
Headers show

Comments

Sasha Levin - Nov. 29, 2011, 8:35 a.m.
This patch prevents the duplication of definitions between kernel headers
and KVM tool code.

Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: rtc-linux@googlegroups.com
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
---
 tools/kvm/hw/rtc.c |   20 +-------------------
 1 files changed, 1 insertions(+), 19 deletions(-)

Patch

diff --git a/tools/kvm/hw/rtc.c b/tools/kvm/hw/rtc.c
index 6d4a05a..fad140f 100644
--- a/tools/kvm/hw/rtc.c
+++ b/tools/kvm/hw/rtc.c
@@ -4,25 +4,7 @@ 
 #include "kvm/kvm.h"
 
 #include <time.h>
-
-/*
- * MC146818 RTC registers
- */
-#define RTC_SECONDS			0x00
-#define RTC_SECONDS_ALARM		0x01
-#define RTC_MINUTES			0x02
-#define RTC_MINUTES_ALARM		0x03
-#define RTC_HOURS			0x04
-#define RTC_HOURS_ALARM			0x05
-#define RTC_DAY_OF_WEEK			0x06
-#define RTC_DAY_OF_MONTH		0x07
-#define RTC_MONTH			0x08
-#define RTC_YEAR			0x09
-
-#define RTC_REG_A			0x0A
-#define RTC_REG_B			0x0B
-#define RTC_REG_C			0x0C
-#define RTC_REG_D			0x0D
+#include <linux/mc146818rtc.h>
 
 struct rtc_device {
 	u8			cmos_idx;