Missed needed use of device_private
This commit is contained in:
parent
3ea787b27c
commit
96e8eba4fc
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: latches.c,v 1.5 2009/01/07 00:09:24 bjh21 Exp $ */
|
||||
/* $NetBSD: latches.c,v 1.6 2011/06/03 07:21:32 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 Ben Harris
|
||||
@ -29,7 +29,7 @@
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: latches.c,v 1.5 2009/01/07 00:09:24 bjh21 Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: latches.c,v 1.6 2011/06/03 07:21:32 matt Exp $");
|
||||
|
||||
#include <sys/device.h>
|
||||
#include <sys/systm.h>
|
||||
@ -101,7 +101,7 @@ latches_attach(device_t parent, device_t self, void *aux)
|
||||
void
|
||||
latcha_update(u_int8_t mask, u_int8_t value)
|
||||
{
|
||||
struct latches_softc *sc = (void *)the_latches;
|
||||
struct latches_softc *sc = device_private(the_latches);
|
||||
|
||||
sc->sc_latcha = (sc->sc_latcha & ~mask) | value;
|
||||
bus_space_write_1(sc->sc_iot, sc->sc_ioh, LATCH_A, sc->sc_latcha);
|
||||
@ -110,7 +110,7 @@ latcha_update(u_int8_t mask, u_int8_t value)
|
||||
void
|
||||
latchb_update(u_int8_t mask, u_int8_t value)
|
||||
{
|
||||
struct latches_softc *sc = (void *)the_latches;
|
||||
struct latches_softc *sc = device_private(the_latches);
|
||||
|
||||
sc->sc_latchb = (sc->sc_latchb & ~mask) | value;
|
||||
bus_space_write_1(sc->sc_iot, sc->sc_ioh, LATCH_B, sc->sc_latcha);
|
||||
|
Loading…
Reference in New Issue
Block a user