On 12/04/09 06:50, Isaku Yamahata wrote:
remove a global variable, RTCState *rtc_state.
Only the cmos_set_s3_resume_init() needs it global.
So introduce a registering function and make it local.
As for other function which references the variable, pass it
as a function argument.

Signed-off-by: Isaku Yamahata<yamah...@valinux.co.jp>
Cc: Paolo Bonzini<bonz...@gnu.org>

--- a/hw/pc.c
+++ b/hw/pc.c
@@ -64,8 +64,6 @@
[ ... ]
-static RTCState *rtc_state;
[ ... ]
+static RTCState *rtc_state;
[ ... ]

Hmm?  Patch description says something else ...

With my qdev hat on: If you cleanup that anyway I'd suggest to make the rtc_* functions accept and return DeviceState instead of RTCState, so the pc.c code just has a "this is the rtc device" kind of reference.

cheers,
  Gerd


Reply via email to