summaryrefslogtreecommitdiff
path: root/sys/arch/atari/dev/clock.c
diff options
context:
space:
mode:
authortsutsui <tsutsui@NetBSD.org>2009-08-23 13:46:48 +0000
committertsutsui <tsutsui@NetBSD.org>2009-08-23 13:46:48 +0000
commit8c2e6a929c0db76800daf7ebe500ea42b8d9c8b8 (patch)
tree2aa252864c34e198aeaa6d0a50a0d0144e7a38f6 /sys/arch/atari/dev/clock.c
parent0e2d8f9be7b379397a611bf2bda63ca3fdc8f3ef (diff)
Use proper pointer types and names rather than casts for readability.
Diffstat (limited to 'sys/arch/atari/dev/clock.c')
-rw-r--r--sys/arch/atari/dev/clock.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/sys/arch/atari/dev/clock.c b/sys/arch/atari/dev/clock.c
index 05efd24555b..94362f1414c 100644
--- a/sys/arch/atari/dev/clock.c
+++ b/sys/arch/atari/dev/clock.c
@@ -1,4 +1,4 @@
-/* $NetBSD: clock.c,v 1.49 2009/07/07 16:16:18 tsutsui Exp $ */
+/* $NetBSD: clock.c,v 1.50 2009/08/23 13:46:48 tsutsui Exp $ */
/*
* Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.49 2009/07/07 16:16:18 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.50 2009/08/23 13:46:48 tsutsui Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -428,18 +428,20 @@ profclock(void *pc, int ps)
* Real Time Clock support *
***********************************************************************/
-u_int mc146818_read(void *rtc, u_int regno)
+u_int mc146818_read(void *cookie, u_int regno)
{
+ struct rtc *rtc = cookie;
- ((struct rtc *)rtc)->rtc_regno = regno;
- return ((struct rtc *)rtc)->rtc_data & 0377;
+ rtc->rtc_regno = regno;
+ return rtc->rtc_data & 0xff;
}
-void mc146818_write(void *rtc, u_int regno, u_int value)
+void mc146818_write(void *cookie, u_int regno, u_int value)
{
+ struct rtc *rtc = cookie;
- ((struct rtc *)rtc)->rtc_regno = regno;
- ((struct rtc *)rtc)->rtc_data = value;
+ rtc->rtc_regno = regno;
+ rtc->rtc_data = value;
}
static int