From: Sasha Levin <levinsasha928@gmail.com>
To: penberg@kernel.org
Cc: kvm@vger.kernel.org, mingo@elte.hu, asias.hejun@gmail.com,
gorcunov@gmail.com, Sasha Levin <levinsasha928@gmail.com>,
Alessandro Zummo <a.zummo@towertech.it>,
rtc-linux@googlegroups.com
Subject: [PATCH 2/3] kvm tools: Include RTC headers directly
Date: Tue, 29 Nov 2011 10:35:34 +0200 [thread overview]
Message-ID: <1322555735-32163-2-git-send-email-levinsasha928@gmail.com> (raw)
In-Reply-To: <1322555735-32163-1-git-send-email-levinsasha928@gmail.com>
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(-)
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;
--
1.7.8.rc3
next prev parent reply other threads:[~2011-11-29 8:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-29 8:35 [PATCH 1/3] rtc: Allow including mc146818 rtc header from userspace Sasha Levin
2011-11-29 8:35 ` Sasha Levin [this message]
2011-11-29 8:35 ` [PATCH 3/3] kvm tools: Add boundry check for rtc cmos index Sasha Levin
2011-11-29 13:07 ` Pekka Enberg
2011-11-29 20:11 ` Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1322555735-32163-2-git-send-email-levinsasha928@gmail.com \
--to=levinsasha928@gmail.com \
--cc=a.zummo@towertech.it \
--cc=asias.hejun@gmail.com \
--cc=gorcunov@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=penberg@kernel.org \
--cc=rtc-linux@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox