Rename flag NO_CENTURY_ADJUST -> MC146818_NO_CENT_ADJUST to avoid conflicts.
This commit is contained in:
parent
31806f9f22
commit
ab09fdd80e
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mc146818.c,v 1.2 2003/10/29 17:41:36 tsutsui Exp $ */
|
||||
/* $NetBSD: mc146818.c,v 1.3 2003/11/01 21:58:43 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003 Izumi Tsutsui. All rights reserved.
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mc146818.c,v 1.2 2003/10/29 17:41:36 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mc146818.c,v 1.3 2003/11/01 21:58:43 tsutsui Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -117,7 +117,7 @@ mc146818_gettime(handle, tv)
|
||||
|
||||
year += sc->sc_year0;
|
||||
if (year < POSIX_BASE_YEAR &&
|
||||
(sc->sc_flag & NO_CENTURY_ADJUST) == 0)
|
||||
(sc->sc_flag & MC146818_NO_CENT_ADJUST) == 0)
|
||||
year += 100;
|
||||
dt.dt_year = year;
|
||||
|
||||
@ -181,7 +181,8 @@ mc146818_settime(handle, tv)
|
||||
(*sc->sc_setcent)(sc, cent);
|
||||
year -= cent * 100;
|
||||
}
|
||||
if (year > 99 && (sc->sc_flag & NO_CENTURY_ADJUST) == 0)
|
||||
if (year > 99 &&
|
||||
(sc->sc_flag & MC146818_NO_CENT_ADJUST) == 0)
|
||||
year -= 100;
|
||||
(*sc->sc_mcwrite)(sc, MC_YEAR, year);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mc146818var.h,v 1.1 2003/10/29 17:00:41 tsutsui Exp $ */
|
||||
/* $NetBSD: mc146818var.h,v 1.2 2003/11/01 21:58:43 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003 Izumi Tsutsui. All rights reserved.
|
||||
@ -35,7 +35,7 @@ struct mc146818_softc {
|
||||
struct todr_chip_handle sc_handle; /* TODR handle */
|
||||
u_int sc_year0; /* year counter offset */
|
||||
u_int sc_flag; /* MD flags */
|
||||
#define NO_CENTURY_ADJUST 0x0001 /* don't adjust century */
|
||||
#define MC146818_NO_CENT_ADJUST 0x0001 /* don't adjust century */
|
||||
|
||||
/* MD chip register read/write functions */
|
||||
u_int (*sc_mcread)(struct mc146818_softc *, u_int);
|
||||
|
Loading…
Reference in New Issue
Block a user