From 7ecae1b00d97483e7e983868cf89f5938279ddb4 Mon Sep 17 00:00:00 2001 From: xtraeme Date: Sun, 4 May 2008 14:01:14 +0000 Subject: [PATCH] Finish device_t/softc split. Previous commit was incomplete. --- sys/dev/gpio/gpioow.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/sys/dev/gpio/gpioow.c b/sys/dev/gpio/gpioow.c index d6b17da6c0a9..c203292e4c44 100644 --- a/sys/dev/gpio/gpioow.c +++ b/sys/dev/gpio/gpioow.c @@ -1,4 +1,4 @@ -/* $NetBSD: gpioow.c,v 1.4 2008/05/01 22:00:44 cegger Exp $ */ +/* $NetBSD: gpioow.c,v 1.5 2008/05/04 14:01:14 xtraeme Exp $ */ /* $OpenBSD: gpioow.c,v 1.1 2006/03/04 16:27:03 grange Exp $ */ /* @@ -18,7 +18,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: gpioow.c,v 1.4 2008/05/01 22:00:44 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gpioow.c,v 1.5 2008/05/04 14:01:14 xtraeme Exp $"); /* * 1-Wire bus bit-banging through GPIO pin. @@ -37,14 +37,12 @@ __KERNEL_RCSID(0, "$NetBSD: gpioow.c,v 1.4 2008/05/01 22:00:44 cegger Exp $"); #define GPIOOW_PIN_DATA 0 struct gpioow_softc { - device_t sc_dev; - void * sc_gpio; struct gpio_pinmap sc_map; int __map[GPIOOW_NPINS]; struct onewire_bus sc_ow_bus; - struct device * sc_ow_dev; + device_t sc_ow_dev; int sc_data; int sc_dying; @@ -63,7 +61,7 @@ void gpioow_bb_tx(void *); int gpioow_bb_get(void *); void gpioow_bb_set(void *, int); -CFATTACH_DECL(gpioow, sizeof(struct gpioow_softc), +CFATTACH_DECL_NEW(gpioow, sizeof(struct gpioow_softc), gpioow_match, gpioow_attach, gpioow_detach, gpioow_activate); extern struct cfdriver gpioow_cd; @@ -90,8 +88,6 @@ gpioow_attach(device_t parent, device_t self, void *aux) struct onewirebus_attach_args oba; int caps; - sc->sc_dev = self; - /* Check that we have enough pins */ if (gpio_npins(ga->ga_mask) != GPIOOW_NPINS) { printf(": invalid pin mask\n");