make this compile
This commit is contained in:
parent
e6e72079ad
commit
f8e41c4991
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: spkr.c,v 1.28 2008/03/04 14:59:35 cube Exp $ */
|
/* $NetBSD: spkr.c,v 1.29 2009/01/11 10:43:06 cegger Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1990 Eric S. Raymond (esr@snark.thyrsus.com)
|
* Copyright (c) 1990 Eric S. Raymond (esr@snark.thyrsus.com)
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: spkr.c,v 1.28 2008/03/04 14:59:35 cube Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: spkr.c,v 1.29 2009/01/11 10:43:06 cegger Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
|
@ -422,11 +422,10 @@ spkrattach(device_t parent, device_t self, void *aux)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
spkropen(dev_t dev, int flags, int mode,
|
spkropen(dev_t dev, int flags, int mode, struct lwp *l)
|
||||||
struct lwp *l)
|
|
||||||
{
|
{
|
||||||
#ifdef SPKRDEBUG
|
#ifdef SPKRDEBUG
|
||||||
printf("spkropen: entering with dev = %x\n", dev);
|
printf("spkropen: entering with dev = %"PRIx64"\n", dev);
|
||||||
#endif /* SPKRDEBUG */
|
#endif /* SPKRDEBUG */
|
||||||
|
|
||||||
if (minor(dev) != 0 || !spkr_attached)
|
if (minor(dev) != 0 || !spkr_attached)
|
||||||
|
@ -448,7 +447,7 @@ spkrwrite(dev_t dev, struct uio *uio, int flags)
|
||||||
int n;
|
int n;
|
||||||
int error;
|
int error;
|
||||||
#ifdef SPKRDEBUG
|
#ifdef SPKRDEBUG
|
||||||
printf("spkrwrite: entering with dev = %x, count = %d\n",
|
printf("spkrwrite: entering with dev = %"PRIx64", count = %d\n",
|
||||||
dev, uio->uio_resid);
|
dev, uio->uio_resid);
|
||||||
#endif /* SPKRDEBUG */
|
#endif /* SPKRDEBUG */
|
||||||
|
|
||||||
|
@ -468,7 +467,7 @@ int spkrclose(dev_t dev, int flags, int mode,
|
||||||
struct lwp *l)
|
struct lwp *l)
|
||||||
{
|
{
|
||||||
#ifdef SPKRDEBUG
|
#ifdef SPKRDEBUG
|
||||||
printf("spkrclose: entering with dev = %x\n", dev);
|
printf("spkrclose: entering with dev = %"PRIx64"\n", dev);
|
||||||
#endif /* SPKRDEBUG */
|
#endif /* SPKRDEBUG */
|
||||||
|
|
||||||
if (minor(dev) != 0)
|
if (minor(dev) != 0)
|
||||||
|
@ -486,7 +485,7 @@ int spkrioctl(dev_t dev, u_long cmd, void *data, int flag,
|
||||||
struct lwp *l)
|
struct lwp *l)
|
||||||
{
|
{
|
||||||
#ifdef SPKRDEBUG
|
#ifdef SPKRDEBUG
|
||||||
printf("spkrioctl: entering with dev = %x, cmd = %lx\n", dev, cmd);
|
printf("spkrioctl: entering with dev = %"PRIx64", cmd = %lx\n", dev, cmd);
|
||||||
#endif /* SPKRDEBUG */
|
#endif /* SPKRDEBUG */
|
||||||
|
|
||||||
if (minor(dev) != 0)
|
if (minor(dev) != 0)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: sequencer.c,v 1.50 2008/07/15 16:18:08 christos Exp $ */
|
/* $NetBSD: sequencer.c,v 1.51 2009/01/11 10:40:27 cegger Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: sequencer.c,v 1.50 2008/07/15 16:18:08 christos Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: sequencer.c,v 1.51 2009/01/11 10:40:27 cegger Exp $");
|
||||||
|
|
||||||
#include "sequencer.h"
|
#include "sequencer.h"
|
||||||
|
|
||||||
|
@ -901,12 +901,12 @@ seq_timer_waitabs(struct sequencer_softc *sc, uint32_t divs)
|
||||||
usec = (long long)divs * (long long)t->usperdiv; /* convert to usec */
|
usec = (long long)divs * (long long)t->usperdiv; /* convert to usec */
|
||||||
when.tv_sec = usec / 1000000;
|
when.tv_sec = usec / 1000000;
|
||||||
when.tv_usec = usec % 1000000;
|
when.tv_usec = usec % 1000000;
|
||||||
DPRINTFN(4, ("seq_timer_waitabs: adjdivs=%d, sleep when=%ld.%06ld",
|
DPRINTFN(4, ("seq_timer_waitabs: adjdivs=%d, sleep when=%"PRId64".%06"PRId64,
|
||||||
divs, when.tv_sec, when.tv_usec));
|
divs, when.tv_sec, (uint64_t)when.tv_usec));
|
||||||
ADDTIMEVAL(&when, &t->reftime); /* abstime for end */
|
ADDTIMEVAL(&when, &t->reftime); /* abstime for end */
|
||||||
ticks = tvhzto(&when);
|
ticks = tvhzto(&when);
|
||||||
DPRINTFN(4, (" when+start=%ld.%06ld, tick=%d\n",
|
DPRINTFN(4, (" when+start=%"PRId64".%06"PRId64", tick=%d\n",
|
||||||
when.tv_sec, when.tv_usec, ticks));
|
when.tv_sec, (uint64_t)when.tv_usec, ticks));
|
||||||
if (ticks > 0) {
|
if (ticks > 0) {
|
||||||
#ifdef DIAGNOSTIC
|
#ifdef DIAGNOSTIC
|
||||||
if (ticks > 20 * hz) {
|
if (ticks > 20 * hz) {
|
||||||
|
|
Loading…
Reference in New Issue