Remove `volatile' qualifier from argument types of
struct timeval passed to todr_gettime(9) and todr_settime(9). We no longer have an ancient and volatile struct timeval `time' global since we have switched to MI timercounter(9) on all port. XXX1: some of these RTC drivers still assume 32bit time_t XXX2: some of these should be rewritten to use todr_[gs]ettime_ymdhms() XXX3: todr(9) man page doesn't mention todr_[gs]ettime_ymdhms()
This commit is contained in:
parent
471e528b58
commit
428585a7d8
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: clock_subr.h,v 1.20 2008/04/28 20:23:46 martin Exp $ */
|
||||
/* $NetBSD: clock_subr.h,v 1.21 2009/12/12 15:10:34 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
@ -77,10 +77,8 @@ struct todr_chip_handle {
|
||||
void *bus_cookie; /* Bus specific data */
|
||||
time_t base_time; /* Base time (e.g. rootfs time) */
|
||||
|
||||
int (*todr_gettime)(struct todr_chip_handle *,
|
||||
volatile struct timeval *);
|
||||
int (*todr_settime)(struct todr_chip_handle *,
|
||||
volatile struct timeval *);
|
||||
int (*todr_gettime)(struct todr_chip_handle *, struct timeval *);
|
||||
int (*todr_settime)(struct todr_chip_handle *, struct timeval *);
|
||||
int (*todr_gettime_ymdhms)(struct todr_chip_handle *,
|
||||
struct clock_ymdhms *);
|
||||
int (*todr_settime_ymdhms)(struct todr_chip_handle *,
|
||||
@ -96,8 +94,8 @@ typedef struct todr_chip_handle *todr_chip_handle_t;
|
||||
/*
|
||||
* Probably these should evolve into internal routines in kern_todr.c.
|
||||
*/
|
||||
extern int todr_gettime(todr_chip_handle_t tch, volatile struct timeval *);
|
||||
extern int todr_settime(todr_chip_handle_t tch, volatile struct timeval *);
|
||||
extern int todr_gettime(todr_chip_handle_t tch, struct timeval *);
|
||||
extern int todr_settime(todr_chip_handle_t tch, struct timeval *);
|
||||
|
||||
/*
|
||||
* Machine-dependent function that machine-independent RTC drivers can
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kern_todr.c,v 1.31 2009/12/12 11:35:16 tsutsui Exp $ */
|
||||
/* $NetBSD: kern_todr.c,v 1.32 2009/12/12 15:17:23 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -76,7 +76,7 @@
|
||||
* @(#)clock.c 8.1 (Berkeley) 6/10/93
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_todr.c,v 1.31 2009/12/12 11:35:16 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_todr.c,v 1.32 2009/12/12 15:17:23 tsutsui Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -240,7 +240,7 @@ resettodr(void)
|
||||
#ifdef TODR_DEBUG
|
||||
static void
|
||||
todr_debug(const char *prefix, int rv, struct clock_ymdhms *dt,
|
||||
volatile struct timeval *tvp)
|
||||
struct timeval *tvp)
|
||||
{
|
||||
struct timeval tv_val;
|
||||
struct clock_ymdhms dt_val;
|
||||
@ -268,7 +268,7 @@ todr_debug(const char *prefix, int rv, struct clock_ymdhms *dt,
|
||||
|
||||
|
||||
int
|
||||
todr_gettime(todr_chip_handle_t tch, volatile struct timeval *tvp)
|
||||
todr_gettime(todr_chip_handle_t tch, struct timeval *tvp)
|
||||
{
|
||||
struct clock_ymdhms dt;
|
||||
int rv;
|
||||
@ -317,7 +317,7 @@ todr_gettime(todr_chip_handle_t tch, volatile struct timeval *tvp)
|
||||
}
|
||||
|
||||
int
|
||||
todr_settime(todr_chip_handle_t tch, volatile struct timeval *tvp)
|
||||
todr_settime(todr_chip_handle_t tch, struct timeval *tvp)
|
||||
{
|
||||
struct clock_ymdhms dt;
|
||||
int rv;
|
||||
|
Loading…
Reference in New Issue
Block a user