Module Name: src Committed By: cegger Date: Mon May 4 12:13:19 UTC 2009
Modified Files: src/sys/arch/i386/pnpbios: ess_pnpbios.c pnpbios.c pnpbiosvar.h wss_pnpbios.c ym_pnpbios.c Log Message: struct device * -> device_t, use device_private To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/i386/pnpbios/ess_pnpbios.c \ src/sys/arch/i386/pnpbios/wss_pnpbios.c cvs rdiff -u -r1.65 -r1.66 src/sys/arch/i386/pnpbios/pnpbios.c cvs rdiff -u -r1.10 -r1.11 src/sys/arch/i386/pnpbios/pnpbiosvar.h cvs rdiff -u -r1.14 -r1.15 src/sys/arch/i386/pnpbios/ym_pnpbios.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/i386/pnpbios/ess_pnpbios.c diff -u src/sys/arch/i386/pnpbios/ess_pnpbios.c:1.17 src/sys/arch/i386/pnpbios/ess_pnpbios.c:1.18 --- src/sys/arch/i386/pnpbios/ess_pnpbios.c:1.17 Mon Apr 28 20:23:25 2008 +++ src/sys/arch/i386/pnpbios/ess_pnpbios.c Mon May 4 12:13:19 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ess_pnpbios.c,v 1.17 2008/04/28 20:23:25 martin Exp $ */ +/* $NetBSD: ess_pnpbios.c,v 1.18 2009/05/04 12:13:19 cegger Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ess_pnpbios.c,v 1.17 2008/04/28 20:23:25 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ess_pnpbios.c,v 1.18 2009/05/04 12:13:19 cegger Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -55,14 +55,14 @@ #include <dev/isa/essreg.h> #include <dev/isa/essvar.h> -int ess_pnpbios_match(struct device *, struct cfdata *, void *); -void ess_pnpbios_attach(struct device *, struct device *, void *); +int ess_pnpbios_match(device_t, cfdata_t, void *); +void ess_pnpbios_attach(device_t, device_t, void *); CFATTACH_DECL(ess_pnpbios, sizeof(struct ess_softc), ess_pnpbios_match, ess_pnpbios_attach, NULL, NULL); int -ess_pnpbios_match(struct device *parent, struct cfdata *match, +ess_pnpbios_match(device_t parent, cfdata_t match, void *aux) { struct pnpbiosdev_attach_args *aa = aux; @@ -82,10 +82,10 @@ } void -ess_pnpbios_attach(struct device *parent, struct device *self, +ess_pnpbios_attach(device_t parent, device_t self, void *aux) { - struct ess_softc *sc = (void *)self; + struct ess_softc *sc = device_private(self); struct pnpbiosdev_attach_args *aa = aux; if (pnpbios_io_map(aa->pbt, aa->resc, 0, &sc->sc_iot, &sc->sc_ioh)) { Index: src/sys/arch/i386/pnpbios/wss_pnpbios.c diff -u src/sys/arch/i386/pnpbios/wss_pnpbios.c:1.17 src/sys/arch/i386/pnpbios/wss_pnpbios.c:1.18 --- src/sys/arch/i386/pnpbios/wss_pnpbios.c:1.17 Sat Mar 14 15:36:07 2009 +++ src/sys/arch/i386/pnpbios/wss_pnpbios.c Mon May 4 12:13:19 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: wss_pnpbios.c,v 1.17 2009/03/14 15:36:07 dsl Exp $ */ +/* $NetBSD: wss_pnpbios.c,v 1.18 2009/05/04 12:13:19 cegger Exp $ */ /* * Copyright (c) 1999 * Matthias Drochner. All rights reserved. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wss_pnpbios.c,v 1.17 2009/03/14 15:36:07 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wss_pnpbios.c,v 1.18 2009/05/04 12:13:19 cegger Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -50,8 +50,8 @@ #include <dev/isa/wssreg.h> #include <dev/isa/wssvar.h> -int wss_pnpbios_match(struct device *, struct cfdata *, void *); -void wss_pnpbios_attach(struct device *, struct device *, void *); +int wss_pnpbios_match(device_t, cfdata_t, void *); +void wss_pnpbios_attach(device_t, device_t, void *); int wss_pnpbios_hints_index(const char *); @@ -88,8 +88,8 @@ } int -wss_pnpbios_match(struct device *parent, - struct cfdata *match, void *aux) +wss_pnpbios_match(device_t parent, + cfdata_t match, void *aux) { struct pnpbiosdev_attach_args *aa = aux; @@ -100,10 +100,10 @@ } void -wss_pnpbios_attach(struct device *parent, struct device *self, +wss_pnpbios_attach(device_t parent, device_t self, void *aux) { - struct wss_softc *sc = (void *)self; + struct wss_softc *sc = device_private(self); struct pnpbiosdev_attach_args *aa = aux; struct audio_attach_args arg; struct wss_pnpbios_hint *wph; Index: src/sys/arch/i386/pnpbios/pnpbios.c diff -u src/sys/arch/i386/pnpbios/pnpbios.c:1.65 src/sys/arch/i386/pnpbios/pnpbios.c:1.66 --- src/sys/arch/i386/pnpbios/pnpbios.c:1.65 Wed Mar 11 10:30:52 2009 +++ src/sys/arch/i386/pnpbios/pnpbios.c Mon May 4 12:13:19 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pnpbios.c,v 1.65 2009/03/11 10:30:52 cegger Exp $ */ +/* $NetBSD: pnpbios.c,v 1.66 2009/05/04 12:13:19 cegger Exp $ */ /* * Copyright (c) 2000 Jason R. Thorpe. All rights reserved. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pnpbios.c,v 1.65 2009/03/11 10:30:52 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pnpbios.c,v 1.66 2009/05/04 12:13:19 cegger Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -126,10 +126,8 @@ /* configuration stuff */ static void * pnpbios_mapit(paddr_t, u_long, int); static void * pnpbios_find(void); -static int pnpbios_match(struct device *, - struct cfdata *, void *); -static void pnpbios_attach(struct device *, - struct device *, void *); +static int pnpbios_match(device_t, cfdata_t, void *); +static void pnpbios_attach(device_t, device_t, void *); static void pnpbios_printres(struct pnpresources *); static int pnpbios_print(void *aux, const char *); static void pnpbios_id_to_string(uint32_t, char *); @@ -761,7 +759,7 @@ } void -pnpbios_print_devres(struct device *dev, struct pnpbiosdev_attach_args *aa) +pnpbios_print_devres(device_t dev, struct pnpbiosdev_attach_args *aa) { aprint_normal_dev(dev, ""); Index: src/sys/arch/i386/pnpbios/pnpbiosvar.h diff -u src/sys/arch/i386/pnpbios/pnpbiosvar.h:1.10 src/sys/arch/i386/pnpbios/pnpbiosvar.h:1.11 --- src/sys/arch/i386/pnpbios/pnpbiosvar.h:1.10 Mon Dec 26 19:24:00 2005 +++ src/sys/arch/i386/pnpbios/pnpbiosvar.h Mon May 4 12:13:19 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pnpbiosvar.h,v 1.10 2005/12/26 19:24:00 perry Exp $ */ +/* $NetBSD: pnpbiosvar.h,v 1.11 2009/05/04 12:13:19 cegger Exp $ */ /* * Copyright (c) 1999 * Matthias Drochner. All rights reserved. @@ -25,6 +25,8 @@ * SUCH DAMAGE. */ +#include <sys/device.h> /* for device_t */ + struct pnpbios_attach_args { isa_chipset_tag_t paa_ic; }; @@ -96,4 +98,4 @@ int pnpbios_getiosize(pnpbios_tag_t, struct pnpresources *, int, int *); int pnpbios_getirqnum(pnpbios_tag_t, struct pnpresources *, int, int *, int *); int pnpbios_getdmachan(pnpbios_tag_t, struct pnpresources *, int, int *); -void pnpbios_print_devres(struct device *, struct pnpbiosdev_attach_args *); +void pnpbios_print_devres(device_t, struct pnpbiosdev_attach_args *); Index: src/sys/arch/i386/pnpbios/ym_pnpbios.c diff -u src/sys/arch/i386/pnpbios/ym_pnpbios.c:1.14 src/sys/arch/i386/pnpbios/ym_pnpbios.c:1.15 --- src/sys/arch/i386/pnpbios/ym_pnpbios.c:1.14 Fri Apr 4 22:18:05 2008 +++ src/sys/arch/i386/pnpbios/ym_pnpbios.c Mon May 4 12:13:19 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ym_pnpbios.c,v 1.14 2008/04/04 22:18:05 cegger Exp $ */ +/* $NetBSD: ym_pnpbios.c,v 1.15 2009/05/04 12:13:19 cegger Exp $ */ /* * Copyright (c) 1999 * Matthias Drochner. All rights reserved. @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ym_pnpbios.c,v 1.14 2008/04/04 22:18:05 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ym_pnpbios.c,v 1.15 2009/05/04 12:13:19 cegger Exp $"); #include "mpu_ym.h" @@ -61,15 +61,15 @@ #include <dev/isa/wssreg.h> #include <dev/isa/ymvar.h> -int ym_pnpbios_match(struct device *, struct cfdata *, void *); -void ym_pnpbios_attach(struct device *, struct device *, void *); +int ym_pnpbios_match(device_t, cfdata_t, void *); +void ym_pnpbios_attach(device_t, device_t, void *); CFATTACH_DECL(ym_pnpbios, sizeof(struct ym_softc), ym_pnpbios_match, ym_pnpbios_attach, NULL, NULL); int -ym_pnpbios_match(struct device *parent, - struct cfdata *match, void *aux) +ym_pnpbios_match(device_t parent, + cfdata_t match, void *aux) { struct pnpbiosdev_attach_args *aa = aux; @@ -80,10 +80,10 @@ } void -ym_pnpbios_attach(struct device *parent, struct device *self, +ym_pnpbios_attach(device_t parent, device_t self, void *aux) { - struct ym_softc *sc = (void *)self; + struct ym_softc *sc = device_private(self); struct ad1848_softc *ac = &sc->sc_ad1848.sc_ad1848; struct pnpbiosdev_attach_args *aa = aux;