summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authormacallan <macallan@NetBSD.org>2008-08-01 19:33:07 +0000
committermacallan <macallan@NetBSD.org>2008-08-01 19:33:07 +0000
commitf675bba46408f80b6d86085b789550beaedfcd68 (patch)
tree5cc4c7f338d5ff8343bfcf3f2a0fa3f69725f99b /sys/dev
parentfb5f9816d8cdef694ad278a52cd82e206022e65f (diff)
fix incomplete device_t-ification
Now it works again.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/i2c/sgsmix.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/i2c/sgsmix.c b/sys/dev/i2c/sgsmix.c
index 17e9d67a204..599cd20daf4 100644
--- a/sys/dev/i2c/sgsmix.c
+++ b/sys/dev/i2c/sgsmix.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sgsmix.c,v 1.5 2008/05/08 02:32:48 macallan Exp $ */
+/* $NetBSD: sgsmix.c,v 1.6 2008/08/01 19:33:07 macallan Exp $ */
/*-
* Copyright (C) 2005 Michael Lorenz.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sgsmix.c,v 1.5 2008/05/08 02:32:48 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sgsmix.c,v 1.6 2008/08/01 19:33:07 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -56,7 +56,7 @@ __KERNEL_RCSID(0, "$NetBSD: sgsmix.c,v 1.5 2008/05/08 02:32:48 macallan Exp $");
struct sgsmix_softc {
device_t sc_dev;
device_t sc_parent;
- struct i2c_controller *sc_i2c;
+ i2c_tag_t sc_i2c;
int sc_node, sc_address;
uint8_t sc_regs[7];
};
@@ -104,7 +104,7 @@ sgsmix_attach(device_t parent, device_t self, void *aux)
sc->sc_parent = parent;
sc->sc_address = args->ia_addr;
aprint_normal(": SGS TDA7433 Basic Audio Processor\n");
- sc->sc_i2c = (struct i2c_controller *)args->ia_tag;
+ sc->sc_i2c = args->ia_tag;
sgsmix_setup(sc);
}
@@ -154,7 +154,7 @@ sgsmix_writereg(struct sgsmix_softc *sc, int reg, uint8_t val)
void
sgsmix_set_speaker_vol(void *cookie, int left, int right)
{
- struct sgsmix_softc *sc = cookie;
+ struct sgsmix_softc *sc = device_private((device_t)cookie);
DPRINTF("%s: speaker %d %d\n", device_xname(sc->sc_dev), left, right);
if (left == 0) {
@@ -175,7 +175,7 @@ sgsmix_set_speaker_vol(void *cookie, int left, int right)
void
sgsmix_set_headphone_vol(void *cookie, int left, int right)
{
- struct sgsmix_softc *sc = cookie;
+ struct sgsmix_softc *sc = device_private((device_t)cookie);
DPRINTF("%s: headphones %d %d\n", device_xname(sc->sc_dev), left, right);
if (left == 0) {
@@ -196,7 +196,7 @@ sgsmix_set_headphone_vol(void *cookie, int left, int right)
void
sgsmix_set_bass_treble(void *cookie, int bass, int treble)
{
- struct sgsmix_softc *sc = cookie;
+ struct sgsmix_softc *sc = device_private((device_t)cookie);
uint8_t b, t;
t = (treble >> 4) & 0xf;