diff options
| author | cegger <cegger@NetBSD.org> | 2009-05-12 14:28:22 +0000 |
|---|---|---|
| committer | cegger <cegger@NetBSD.org> | 2009-05-12 14:28:22 +0000 |
| commit | 99747a8099a6916ccfc458619170aec025801090 (patch) | |
| tree | ed83c31f3df5ebd379b3526e1559ea4b9504f9f0 /sys/dev | |
| parent | 529e91fca122669b504cb1884e26151066d21832 (diff) | |
struct device * -> device_t, no functional changes intended.
Diffstat (limited to 'sys/dev')
29 files changed, 209 insertions, 209 deletions
diff --git a/sys/dev/if_ndis/if_ndis_pci.c b/sys/dev/if_ndis/if_ndis_pci.c index 326459b5987..9b63531d6bb 100644 --- a/sys/dev/if_ndis/if_ndis_pci.c +++ b/sys/dev/if_ndis/if_ndis_pci.c @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_ndis_pci.c,v 1.14 2009/05/12 12:17:51 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ndis_pci.c,v 1.15 2009/05/12 14:28:22 cegger Exp $"); #ifdef __FreeBSD__ __FBSDID("$FreeBSD: src/sys/dev/if_ndis/if_ndis_pci.c,v 1.8.2.3 2005/03/31 04:24:36 wpaul Exp $"); #endif @@ -85,11 +85,11 @@ static struct ndis_pci_type ndis_devs[] = { { 0, 0, 0, NULL } }; -/*static*/ int ndis_probe_pci(struct device *parent, +/*static*/ int ndis_probe_pci(device_t parent, cfdata_t match, void *aux); -/*static*/ void ndis_attach_pci(struct device *parent, - struct device *self, +/*static*/ void ndis_attach_pci(device_t parent, + device_t self, void *aux); extern void ndis_attach (void *); extern int ndis_shutdown (device_t); @@ -145,7 +145,7 @@ void load_ndisdrv(void *arg) } /*static*/ int -ndis_probe_pci(struct device *parent, cfdata_t match, void *aux) +ndis_probe_pci(device_t parent, cfdata_t match, void *aux) { struct pci_attach_args *pa = aux; int vendor = PCI_VENDOR(pa->pa_id); @@ -187,7 +187,7 @@ ndis_probe_pci(struct device *parent, cfdata_t match, void *aux) #define MAX_RESOURCES 7 /*static*/ -void ndis_attach_pci(struct device *parent, struct device *self, void *aux) +void ndis_attach_pci(device_t parent, device_t self, void *aux) { struct ndis_softc *sc = (struct ndis_softc*)self; struct pci_attach_args *pa = aux; diff --git a/sys/dev/ir/cir.c b/sys/dev/ir/cir.c index ff56363cbda..885077e43f0 100644 --- a/sys/dev/ir/cir.c +++ b/sys/dev/ir/cir.c @@ -1,4 +1,4 @@ -/* $NetBSD: cir.c,v 1.24 2009/05/12 12:18:09 cegger Exp $ */ +/* $NetBSD: cir.c,v 1.25 2009/05/12 14:29:42 cegger Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cir.c,v 1.24 2009/05/12 12:18:09 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cir.c,v 1.25 2009/05/12 14:29:42 cegger Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -59,10 +59,10 @@ const struct cdevsw cir_cdevsw = { D_OTHER }; -int cir_match(struct device *parent, cfdata_t match, void *aux); -void cir_attach(struct device *parent, struct device *self, void *aux); -int cir_activate(struct device *self, enum devact act); -int cir_detach(struct device *self, int flags); +int cir_match(device_t parent, cfdata_t match, void *aux); +void cir_attach(device_t parent, device_t self, void *aux); +int cir_activate(device_t self, enum devact act); +int cir_detach(device_t self, int flags); CFATTACH_DECL(cir, sizeof(struct cir_softc), cir_match, cir_attach, cir_detach, cir_activate); @@ -72,7 +72,7 @@ extern struct cfdriver cir_cd; #define CIRUNIT(dev) (minor(dev)) int -cir_match(struct device *parent, cfdata_t match, void *aux) +cir_match(device_t parent, cfdata_t match, void *aux) { struct ir_attach_args *ia = aux; @@ -80,7 +80,7 @@ cir_match(struct device *parent, cfdata_t match, void *aux) } void -cir_attach(struct device *parent, struct device *self, void *aux) +cir_attach(device_t parent, device_t self, void *aux) { struct cir_softc *sc = device_private(self); struct ir_attach_args *ia = aux; @@ -99,7 +99,7 @@ cir_attach(struct device *parent, struct device *self, void *aux) } int -cir_activate(struct device *self, enum devact act) +cir_activate(device_t self, enum devact act) { /*struct cir_softc *sc = device_private(self);*/ @@ -115,7 +115,7 @@ cir_activate(struct device *self, enum devact act) } int -cir_detach(struct device *self, int flags) +cir_detach(device_t self, int flags) { struct cir_softc *sc = device_private(self); int maj, mn; diff --git a/sys/dev/ir/irframe_tty.c b/sys/dev/ir/irframe_tty.c index 38ba4647a4b..0334e90c981 100644 --- a/sys/dev/ir/irframe_tty.c +++ b/sys/dev/ir/irframe_tty.c @@ -1,4 +1,4 @@ -/* $NetBSD: irframe_tty.c,v 1.57 2009/05/12 12:18:09 cegger Exp $ */ +/* $NetBSD: irframe_tty.c,v 1.58 2009/05/12 14:29:42 cegger Exp $ */ /* * TODO @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: irframe_tty.c,v 1.57 2009/05/12 12:18:09 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: irframe_tty.c,v 1.58 2009/05/12 14:29:42 cegger Exp $"); #include <sys/param.h> #include <sys/proc.h> @@ -196,8 +196,8 @@ static struct linesw irframet_disc = { }; /* glue to attach irframe device */ -static void irframet_attach(struct device *, struct device *, void *); -static int irframet_detach(struct device *, int); +static void irframet_attach(device_t, device_t, void *); +static int irframet_detach(device_t, int); CFATTACH_DECL_NEW(irframet, sizeof(struct irframet_softc), NULL, irframet_attach, irframet_detach, NULL); @@ -240,7 +240,7 @@ irframet_attach(device_t parent, device_t self, void *aux) } static int -irframet_detach(struct device *dev, int flags) +irframet_detach(device_t dev, int flags) { struct irframet_softc *sc = device_private(dev); int rc; diff --git a/sys/dev/ir/irframevar.h b/sys/dev/ir/irframevar.h index 6af47848a2f..0af04ec9234 100644 --- a/sys/dev/ir/irframevar.h +++ b/sys/dev/ir/irframevar.h @@ -1,4 +1,4 @@ -/* $NetBSD: irframevar.h,v 1.18 2008/04/28 20:23:51 martin Exp $ */ +/* $NetBSD: irframevar.h,v 1.19 2009/05/12 14:29:42 cegger Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -58,5 +58,5 @@ struct irframe_softc { #define IRDA_MAX_FRAME_SIZE 2048 #define IRDA_MAX_EBOFS 64 -void irframe_attach(struct device *, struct device *, void *); -int irframe_detach(struct device *, int); +void irframe_attach(device_t, device_t, void *); +int irframe_detach(device_t, int); diff --git a/sys/dev/marvell/gt.c b/sys/dev/marvell/gt.c index c39de267ef7..9e2a87275f0 100644 --- a/sys/dev/marvell/gt.c +++ b/sys/dev/marvell/gt.c @@ -1,4 +1,4 @@ -/* $NetBSD: gt.c,v 1.20 2009/05/12 12:18:45 cegger Exp $ */ +/* $NetBSD: gt.c,v 1.21 2009/05/12 14:30:25 cegger Exp $ */ /* * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gt.c,v 1.20 2009/05/12 12:18:45 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gt.c,v 1.21 2009/05/12 14:30:25 cegger Exp $"); #include "opt_marvell.h" #include "locators.h" @@ -115,7 +115,7 @@ gt_cfprint (void *aux, const char *pnp) static int -gt_cfsearch(struct device *parent, cfdata_t cf, +gt_cfsearch(device_t parent, cfdata_t cf, const int *ldesc, void *aux) { struct gt_softc *gt = (struct gt_softc *) parent; @@ -932,8 +932,8 @@ gt_devbus_intr_enb(struct gt_softc *gt) int gt_mii_read( - struct device *child, - struct device *parent, + device_t child, + device_t parent, int phy, int reg) { @@ -973,8 +973,8 @@ gt_mii_read( void gt_mii_write ( - struct device *child, - struct device *parent, + device_t child, + device_t parent, int phy, int reg, int value) { diff --git a/sys/dev/marvell/gti2c.c b/sys/dev/marvell/gti2c.c index 9b0f6435b4d..d2deedec030 100644 --- a/sys/dev/marvell/gti2c.c +++ b/sys/dev/marvell/gti2c.c @@ -1,4 +1,4 @@ -/* $NetBSD: gti2c.c,v 1.11 2009/05/12 12:18:45 cegger Exp $ */ +/* $NetBSD: gti2c.c,v 1.12 2009/05/12 14:30:25 cegger Exp $ */ /* * Copyright (c) 2005 Brocade Communcations, inc. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gti2c.c,v 1.11 2009/05/12 12:18:45 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gti2c.c,v 1.12 2009/05/12 14:30:25 cegger Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -57,8 +57,8 @@ struct gti2c_softc { kmutex_t sc_lock; }; -static int gt_i2c_match(struct device *, cfdata_t, void *); -static void gt_i2c_attach(struct device *, struct device *, void *); +static int gt_i2c_match(device_t, cfdata_t, void *); +static void gt_i2c_attach(device_t, device_t, void *); CFATTACH_DECL(gtiic, sizeof(struct gti2c_softc), gt_i2c_match, gt_i2c_attach, NULL, NULL); @@ -231,7 +231,7 @@ gt_i2c_intr(void *aux) } int -gt_i2c_match(struct device *parent, cfdata_t cfdata, void *aux) +gt_i2c_match(device_t parent, cfdata_t cfdata, void *aux) { struct gt_softc * const gt = device_private(parent); struct gt_attach_args * const ga = aux; @@ -240,7 +240,7 @@ gt_i2c_match(struct device *parent, cfdata_t cfdata, void *aux) } void -gt_i2c_attach(struct device *parent, struct device *self, void *aux) +gt_i2c_attach(device_t parent, device_t self, void *aux) { struct gt_softc * const gt = device_private(parent); struct gti2c_softc * const sc = device_private(self); diff --git a/sys/dev/marvell/gtidma.c b/sys/dev/marvell/gtidma.c index 109188f3fdf..d2396ff6147 100644 --- a/sys/dev/marvell/gtidma.c +++ b/sys/dev/marvell/gtidma.c @@ -1,4 +1,4 @@ -/* $NetBSD: gtidma.c,v 1.17 2009/05/12 12:18:45 cegger Exp $ */ +/* $NetBSD: gtidma.c,v 1.18 2009/05/12 14:30:25 cegger Exp $ */ /* * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc. @@ -44,7 +44,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gtidma.c,v 1.17 2009/05/12 12:18:45 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gtidma.c,v 1.18 2009/05/12 14:30:25 cegger Exp $"); #include "opt_idma.h" #include "opt_ddb.h" @@ -228,8 +228,8 @@ idma_list_sync_post(idma_chan_t * const idcp, idma_desch_t *iddhp) #endif /* IDMA_COHERENT */ -STATIC void idma_attach (struct device *, struct device *, void *); -STATIC int idma_match (struct device *, cfdata_t, void *); +STATIC void idma_attach (device_t, device_t, void *); +STATIC int idma_match (device_t, cfdata_t, void *); STATIC void idma_chan_init (idma_softc_t *, idma_chan_t *, unsigned int); STATIC void idma_arb_init(idma_softc_t *); @@ -265,7 +265,7 @@ idma_softc_t *idma_sc = 0; STATIC int idma_match( - struct device * const parent, + device_t const parent, cfdata_t const self, void *const aux) { @@ -279,8 +279,8 @@ idma_match( STATIC void idma_attach( - struct device * const parent, - struct device * const self, + device_t const parent, + device_t const self, void *const aux) { struct gt_softc * const gtsc = device_private(parent); diff --git a/sys/dev/marvell/gtmpsc.c b/sys/dev/marvell/gtmpsc.c index 937f10c97f7..84a6e4c6ca4 100644 --- a/sys/dev/marvell/gtmpsc.c +++ b/sys/dev/marvell/gtmpsc.c @@ -1,4 +1,4 @@ -/* $NetBSD: gtmpsc.c,v 1.36 2009/05/12 12:18:45 cegger Exp $ */ +/* $NetBSD: gtmpsc.c,v 1.37 2009/05/12 14:30:25 cegger Exp $ */ /* * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc. @@ -45,7 +45,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gtmpsc.c,v 1.36 2009/05/12 12:18:45 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gtmpsc.c,v 1.37 2009/05/12 14:30:25 cegger Exp $"); #include "opt_kgdb.h" @@ -118,8 +118,8 @@ unsigned int gtmpsc_debug = 0; #define GTMPSCDIALOUT(x) (minor(x) & GTMPSCDIALOUT_MASK) STATIC void gtmpscinit(struct gtmpsc_softc *); -STATIC int gtmpscmatch(struct device *, cfdata_t, void *); -STATIC void gtmpscattach(struct device *, struct device *, void *); +STATIC int gtmpscmatch(device_t, cfdata_t, void *); +STATIC void gtmpscattach(device_t, device_t, void *); STATIC int compute_cdv(unsigned int); STATIC void gtmpsc_loadchannelregs(struct gtmpsc_softc *); STATIC void gtmpscshutdown(struct gtmpsc_softc *); @@ -419,7 +419,7 @@ gtmpsc_loadchannelregs(struct gtmpsc_softc *sc) } STATIC int -gtmpscmatch(struct device *parent, cfdata_t self, void *aux) +gtmpscmatch(device_t parent, cfdata_t self, void *aux) { struct gt_softc *gt = device_private(parent); struct gt_attach_args *ga = aux; @@ -428,7 +428,7 @@ gtmpscmatch(struct device *parent, cfdata_t self, void *aux) } STATIC void -gtmpscattach(struct device *parent, struct device *self, void *aux) +gtmpscattach(device_t parent, device_t self, void *aux) { struct gt_attach_args *ga = aux; struct gt_softc *gt = device_private(parent); diff --git a/sys/dev/marvell/gtpci.c b/sys/dev/marvell/gtpci.c index 372904fd96d..77c05857bb7 100644 --- a/sys/dev/marvell/gtpci.c +++ b/sys/dev/marvell/gtpci.c @@ -1,4 +1,4 @@ -/* $NetBSD: gtpci.c,v 1.20 2009/05/12 12:18:45 cegger Exp $ */ +/* $NetBSD: gtpci.c,v 1.21 2009/05/12 14:30:25 cegger Exp $ */ /* * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc. @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gtpci.c,v 1.20 2009/05/12 12:18:45 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gtpci.c,v 1.21 2009/05/12 14:30:25 cegger Exp $"); #include "opt_marvell.h" #include <sys/param.h> @@ -65,7 +65,7 @@ static int gtpci_error_intr(void *); static void gtpci_bus_init(struct gtpci_chipset *); -static void gtpci_bus_attach_hook(struct device *, struct device *, +static void gtpci_bus_attach_hook(device_t, device_t, struct pcibus_attach_args *); static int gtpci_bus_maxdevs(pci_chipset_tag_t, int); @@ -87,8 +87,8 @@ struct gtpci_softc { }; static int gtpci_cfprint(void *, const char *); -static int gtpci_match(struct device *, cfdata_t, void *); -static void gtpci_attach(struct device *, struct device *, void *); +static int gtpci_match(device_t, cfdata_t, void *); +static void gtpci_attach(device_t, device_t, void *); CFATTACH_DECL(gtpci, sizeof(struct gtpci_softc), gtpci_match, gtpci_attach, NULL, NULL); @@ -194,7 +194,7 @@ static const struct pci_init { }; int -gtpci_match(struct device *parent, cfdata_t self, void *aux) +gtpci_match(device_t parent, cfdata_t self, void *aux) { struct gt_softc * const gt = device_private(parent); struct gt_attach_args * const ga = aux; @@ -216,7 +216,7 @@ gtpci_cfprint(void *aux, const char *pnp) } void -gtpci_attach(struct device *parent, struct device *self, void *aux) +gtpci_attach(device_t parent, device_t self, void *aux) { struct pcibus_attach_args pba; struct gt_attach_args * const ga = aux; @@ -452,7 +452,7 @@ gtpci_bus_init(struct gtpci_chipset *gtpc) } void -gtpci_bus_attach_hook(struct device *parent, struct device *self, +gtpci_bus_attach_hook(device_t parent, device_t self, struct pcibus_attach_args *pba) { struct gtpci_chipset *gtpc = (struct gtpci_chipset *) pba->pba_pc; diff --git a/sys/dev/marvell/gtvar.h b/sys/dev/marvell/gtvar.h index 9a04d6d6d55..dfe93317bdc 100644 --- a/sys/dev/marvell/gtvar.h +++ b/sys/dev/marvell/gtvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: gtvar.h,v 1.13 2007/02/21 23:00:00 thorpej Exp $ */ +/* $NetBSD: gtvar.h,v 1.14 2009/05/12 14:30:25 cegger Exp $ */ /* * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc. @@ -119,8 +119,8 @@ uint32_t gt_read_mpp(void); int gt_cfprint(void *, const char *); /* int gt_bs_extent_init(struct discovery_bus_space *, char *); AKB */ -int gt_mii_read(struct device *, struct device *, int, int); -void gt_mii_write(struct device *, struct device *, int, int, int); +int gt_mii_read(device_t, device_t, int, int); +void gt_mii_write(device_t, device_t, int, int, int); int gtget_macaddr(struct gt_softc *,int, char *); void gt_watchdog_service(void); bus_addr_t gt_dma_phys_to_bus_mem(bus_dma_tag_t, bus_addr_t); diff --git a/sys/dev/marvell/if_gfe.c b/sys/dev/marvell/if_gfe.c index da4251a2954..662a2bcec74 100644 --- a/sys/dev/marvell/if_gfe.c +++ b/sys/dev/marvell/if_gfe.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_gfe.c,v 1.32 2009/05/12 12:18:45 cegger Exp $ */ +/* $NetBSD: if_gfe.c,v 1.33 2009/05/12 14:30:25 cegger Exp $ */ /* * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_gfe.c,v 1.32 2009/05/12 12:18:45 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_gfe.c,v 1.33 2009/05/12 14:30:25 cegger Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -144,8 +144,8 @@ enum gfe_hash_op { #define STATIC -STATIC int gfe_match (struct device *, cfdata_t, void *); -STATIC void gfe_attach (struct device *, struct device *, void *); +STATIC int gfe_match (device_t, cfdata_t, void *); +STATIC void gfe_attach (device_t, device_t, void *); STATIC int gfe_dmamem_alloc(struct gfe_softc *, struct gfe_dmamem *, int, size_t, int); @@ -155,9 +155,9 @@ STATIC int gfe_ifioctl (struct ifnet *, u_long, void *); STATIC void gfe_ifstart (struct ifnet *); STATIC void gfe_ifwatchdog (struct ifnet *); -STATIC int gfe_mii_read (struct device *, int, int); -STATIC void gfe_mii_write (struct device *, int, int, int); -STATIC void gfe_mii_statchg (struct device *); +STATIC int gfe_mii_read (device_t, int, int); +STATIC void gfe_mii_write (device_t, int, int, int); +STATIC void gfe_mii_statchg (device_t); STATIC void gfe_tick(void *arg); @@ -196,7 +196,7 @@ CFATTACH_DECL(gfe, sizeof(struct gfe_softc), extern struct cfdriver gfe_cd; int -gfe_match(struct device *parent, cfdata_t cf, void *aux) +gfe_match(device_t parent, cfdata_t cf, void *aux) { struct gt_softc *gt = (struct gt_softc *) parent; struct gt_attach_args *ga = aux; @@ -219,7 +219,7 @@ gfe_match(struct device *parent, cfdata_t cf, void *aux) * Attach this instance, and then all the sub-devices */ void -gfe_attach(struct device *parent, struct device *self, void *aux) +gfe_attach(device_t parent, device_t self, void *aux) { struct gt_attach_args * const ga = aux; struct gt_softc * const gt = device_private(parent); @@ -1480,19 +1480,19 @@ gfe_intr(void *arg) } int -gfe_mii_read (struct device *self, int phy, int reg) +gfe_mii_read (device_t self, int phy, int reg) { return gt_mii_read(self, device_parent(self), phy, reg); } void -gfe_mii_write (struct device *self, int phy, int reg, int value) +gfe_mii_write (device_t self, int phy, int reg, int value) { gt_mii_write(self, device_parent(self), phy, reg, value); } void -gfe_mii_statchg (struct device *self) +gfe_mii_statchg (device_t self) { /* struct gfe_softc *sc = device_private(self); */ /* do nothing? */ diff --git a/sys/dev/marvell/obio.c b/sys/dev/marvell/obio.c index b4701d1971a..56ea233bbaf 100644 --- a/sys/dev/marvell/obio.c +++ b/sys/dev/marvell/obio.c @@ -1,4 +1,4 @@ -/* $NetBSD: obio.c,v 1.11 2009/05/12 12:18:45 cegger Exp $ */ +/* $NetBSD: obio.c,v 1.12 2009/05/12 14:30:25 cegger Exp $ */ /* * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.11 2009/05/12 12:18:45 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.12 2009/05/12 14:30:25 cegger Exp $"); #include "opt_marvell.h" @@ -71,10 +71,10 @@ __KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.11 2009/05/12 12:18:45 cegger Exp $"); #include "locators.h" static int obio_cfprint(void *, const char *); -static int obio_cfmatch(struct device *, cfdata_t, void *); -static int obio_cfsearch(struct device *, cfdata_t, +static int obio_cfmatch(device_t, cfdata_t, void *); +static int obio_cfsearch(device_t, cfdata_t, const int *, void *); -static void obio_cfattach(struct device *, struct device *, void *); +static void obio_cfattach(device_t, device_t, void *); struct obio_softc { struct device sc_dev; @@ -118,7 +118,7 @@ obio_cfprint(void *aux, const char *pnp) int -obio_cfsearch(struct device *parent, cfdata_t cf, +obio_cfsearch(device_t parent, cfdata_t cf, const int *ldesc, void *aux) { struct obio_softc *sc = (struct obio_softc *) parent; @@ -137,7 +137,7 @@ obio_cfsearch(struct device *parent, cfdata_t cf, } int -obio_cfmatch(struct device *parent, cfdata_t cf, void *aux) +obio_cfmatch(device_t parent, cfdata_t cf, void *aux) { struct gt_softc * const gt = (struct gt_softc *)parent; struct gt_attach_args * const ga = aux; @@ -146,7 +146,7 @@ obio_cfmatch(struct device *parent, cfdata_t cf, void *aux) } void -obio_cfattach(struct device *parent, struct device *self, void *aux) +obio_cfattach(device_t parent, device_t self, void *aux) { struct gt_softc * const gt = device_private(parent); struct obio_softc *sc = device_private(self); diff --git a/sys/dev/mca/aha_mca.c b/sys/dev/mca/aha_mca.c index b2838ebb4a3..7bde73a7512 100644 --- a/sys/dev/mca/aha_mca.c +++ b/sys/dev/mca/aha_mca.c @@ -1,4 +1,4 @@ -/* $NetBSD: aha_mca.c,v 1.19 2009/05/12 13:15:24 cegger Exp $ */ +/* $NetBSD: aha_mca.c,v 1.20 2009/05/12 14:31:00 cegger Exp $ */ /* * Copyright (c) 2000-2002 The NetBSD Foundation, Inc. @@ -52,7 +52,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: aha_mca.c,v 1.19 2009/05/12 13:15:24 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aha_mca.c,v 1.20 2009/05/12 14:31:00 cegger Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -77,14 +77,14 @@ __KERNEL_RCSID(0, "$NetBSD: aha_mca.c,v 1.19 2009/05/12 13:15:24 cegger Exp $"); #define AHA_ISA_IOSIZE 4 -int aha_mca_probe(struct device *, cfdata_t, void *); -void aha_mca_attach(struct device *, struct device *, void *); +int aha_mca_probe(device_t, cfdata_t, void *); +void aha_mca_attach(device_t, device_t, void *); CFATTACH_DECL(aha_mca, sizeof(struct aha_softc), aha_mca_probe, aha_mca_attach, NULL, NULL); int -aha_mca_probe(struct device *parent, cfdata_t match, +aha_mca_probe(device_t parent, cfdata_t match, void *aux) { register struct mca_attach_args *ma = aux; @@ -97,7 +97,7 @@ aha_mca_probe(struct device *parent, cfdata_t match, void -aha_mca_attach(struct device *parent, struct device *self, void *aux) +aha_mca_attach(device_t parent, device_t self, void *aux) { struct mca_attach_args *ma = aux; struct aha_softc *sc = device_private(self); diff --git a/sys/dev/mca/ed_mca.c b/sys/dev/mca/ed_mca.c index bcbadcc68aa..7ebd5007d46 100644 --- a/sys/dev/mca/ed_mca.c +++ b/sys/dev/mca/ed_mca.c @@ -1,4 +1,4 @@ -/* $NetBSD: ed_mca.c,v 1.46 2009/05/12 13:15:24 cegger Exp $ */ +/* $NetBSD: ed_mca.c,v 1.47 2009/05/12 14:31:00 cegger Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ed_mca.c,v 1.46 2009/05/12 13:15:24 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ed_mca.c,v 1.47 2009/05/12 14:31:00 cegger Exp $"); #include "rnd.h" @@ -78,8 +78,8 @@ __KERNEL_RCSID(0, "$NetBSD: ed_mca.c,v 1.46 2009/05/12 13:15:24 cegger Exp $"); #define EDLABELDEV(dev) (MAKEDISKDEV(major(dev), DISKUNIT(dev), RAW_PART)) -static int ed_mca_probe (struct device *, cfdata_t, void *); -static void ed_mca_attach (struct device *, struct device *, void *); +static int ed_mca_probe (device_t, cfdata_t, void *); +static void ed_mca_attach (device_t, device_t, void *); CFATTACH_DECL(ed_mca, sizeof(struct ed_softc), ed_mca_probe, ed_mca_attach, NULL, NULL); @@ -115,7 +115,7 @@ static struct dkdriver eddkdriver = { edmcastrategy, minphys }; * Just check if it's possible to identify the disk. */ static int -ed_mca_probe(struct device *parent, cfdata_t cf, +ed_mca_probe(device_t parent, cfdata_t cf, void *aux) { u_int16_t cmd_args[2]; @@ -135,7 +135,7 @@ ed_mca_probe(struct device *parent, cfdata_t cf, } static void -ed_mca_attach(struct device *parent, struct device *self, void *aux) +ed_mca_attach(device_t parent, device_t self, void *aux) { struct ed_softc *ed = device_private(self); struct edc_mca_softc *sc = device_private(parent); diff --git a/sys/dev/mca/edc_mca.c b/sys/dev/mca/edc_mca.c index 9612518e486..b0ec93750f0 100644 --- a/sys/dev/mca/edc_mca.c +++ b/sys/dev/mca/edc_mca.c @@ -1,4 +1,4 @@ -/* $NetBSD: edc_mca.c,v 1.43 2009/05/12 13:15:24 cegger Exp $ */ +/* $NetBSD: edc_mca.c,v 1.44 2009/05/12 14:31:00 cegger Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -46,7 +46,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: edc_mca.c,v 1.43 2009/05/12 13:15:24 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: edc_mca.c,v 1.44 2009/05/12 14:31:00 cegger Exp $"); #include "rnd.h" @@ -116,8 +116,8 @@ struct edc_mca_softc { u_int16_t status_block[EDC_MAX_CMD_RES_LEN]; }; -int edc_mca_probe(struct device *, cfdata_t, void *); -void edc_mca_attach(struct device *, struct device *, void *); +int edc_mca_probe(device_t, cfdata_t, void *); +void edc_mca_attach(device_t, device_t, void *); CFATTACH_DECL(edc_mca, sizeof(struct edc_mca_softc), edc_mca_probe, edc_mca_attach, NULL, NULL); @@ -130,7 +130,7 @@ static void edc_cmd_wait(struct edc_mca_softc *, int, int); static void edcworker(void *); int -edc_mca_probe(struct device *parent, cfdata_t match, +edc_mca_probe(device_t parent, cfdata_t match, void *aux) { struct mca_attach_args *ma = aux; @@ -145,7 +145,7 @@ edc_mca_probe(struct device *parent, cfdata_t match, } void -edc_mca_attach(struct device *parent, struct device *self, void *aux) +edc_mca_attach(device_t parent, device_t self, void *aux) { struct edc_mca_softc *sc = device_private(self); struct mca_attach_args *ma = aux; diff --git a/sys/dev/mca/if_elmc_mca.c b/sys/dev/mca/if_elmc_mca.c index 8befdbb47c7..b665b63598f 100644 --- a/sys/dev/mca/if_elmc_mca.c +++ b/sys/dev/mca/if_elmc_mca.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_elmc_mca.c,v 1.28 2009/05/12 13:15:24 cegger Exp $ */ +/* $NetBSD: if_elmc_mca.c,v 1.29 2009/05/12 14:31:00 cegger Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_elmc_mca.c,v 1.28 2009/05/12 13:15:24 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_elmc_mca.c,v 1.29 2009/05/12 14:31:00 cegger Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -72,8 +72,8 @@ struct elmc_mca_softc { void *sc_ih; /* interrupt handle */ }; -int elmc_mca_match(struct device *, cfdata_t, void *); -void elmc_mca_attach(struct device *, struct device *, void *); +int elmc_mca_match(device_t, cfdata_t, void *); +void elmc_mca_attach(device_t, device_t, void *); static void elmc_mca_copyin(struct ie_softc *, void *, int, size_t); static void elmc_mca_copyout(struct ie_softc *, const void *, int, size_t); @@ -85,7 +85,7 @@ static void elmc_mca_hwreset(struct ie_softc *, int); static int elmc_mca_intrhook(struct ie_softc *, int); int -elmc_mca_match(struct device *parent, cfdata_t cf, +elmc_mca_match(device_t parent, cfdata_t cf, void *aux) { struct mca_attach_args *ma = aux; @@ -99,7 +99,7 @@ elmc_mca_match(struct device *parent, cfdata_t cf, } void -elmc_mca_attach(struct device *parent, struct device *self, void *aux) +elmc_mca_attach(device_t parent, device_t self, void *aux) { struct elmc_mca_softc *asc = device_private(self); struct ie_softc *sc = &asc->sc_ie; diff --git a/sys/dev/mca/if_tr_mca.c b/sys/dev/mca/if_tr_mca.c index 8e619429a27..870d540a2d4 100644 --- a/sys/dev/mca/if_tr_mca.c +++ b/sys/dev/mca/if_tr_mca.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_tr_mca.c,v 1.20 2009/05/12 13:15:24 cegger Exp $ */ +/* $NetBSD: if_tr_mca.c,v 1.21 2009/05/12 14:31:00 cegger Exp $ */ /*_ * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_tr_mca.c,v 1.20 2009/05/12 13:15:24 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_tr_mca.c,v 1.21 2009/05/12 14:31:00 cegger Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -61,8 +61,8 @@ __KERNEL_RCSID(0, "$NetBSD: if_tr_mca.c,v 1.20 2009/05/12 13:15:24 cegger Exp $" #define TR_MBPS_4 0 #define TR_MBPS_16 1 -int tr_mca_probe(struct device *, cfdata_t, void *); -void tr_mca_attach(struct device *, struct device *, void *); +int tr_mca_probe(device_t, cfdata_t, void *); +void tr_mca_attach(device_t, device_t, void *); CFATTACH_DECL(tr_mca, sizeof(struct tr_softc), tr_mca_probe, tr_mca_attach, NULL, NULL); @@ -91,7 +91,7 @@ tr_mca_lookup(int id) } int -tr_mca_probe(struct device *parent, cfdata_t match, +tr_mca_probe(device_t parent, cfdata_t match, void *aux) { struct mca_attach_args *ma = aux; @@ -104,7 +104,7 @@ tr_mca_probe(struct device *parent, cfdata_t match, void -tr_mca_attach(struct device *parent, struct device *self, void *aux) +tr_mca_attach(device_t parent, device_t self, void *aux) { struct tr_softc *sc = device_private(self); struct mca_attach_args *ma = aux; diff --git a/sys/dev/mca/if_tra_mca.c b/sys/dev/mca/if_tra_mca.c index e076607caae..4fe0b321168 100644 --- a/sys/dev/mca/if_tra_mca.c +++ b/sys/dev/mca/if_tra_mca.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_tra_mca.c,v 1.13 2009/05/12 13:15:24 cegger Exp $ */ +/* $NetBSD: if_tra_mca.c,v 1.14 2009/05/12 14:31:00 cegger Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_tra_mca.c,v 1.13 2009/05/12 13:15:24 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_tra_mca.c,v 1.14 2009/05/12 14:31:00 cegger Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -56,8 +56,8 @@ __KERNEL_RCSID(0, "$NetBSD: if_tra_mca.c,v 1.13 2009/05/12 13:15:24 cegger Exp $ #include <dev/mca/mcavar.h> #include <dev/mca/mcadevs.h> -int tiara_mca_match(struct device *, cfdata_t, void *); -void tiara_mca_attach(struct device *, struct device *, void *); +int tiara_mca_match(device_t, cfdata_t, void *); +void tiara_mca_attach(device_t, device_t, void *); #define TIARA_NPORTS 0x20 /* 32 */ #define TIARA_PROM_ID 24 /* offset to mac addr stored in prom */ @@ -97,7 +97,7 @@ tiara_mca_lookup(u_int32_t id) } int -tiara_mca_match(struct device *parent, cfdata_t match, +tiara_mca_match(device_t parent, cfdata_t match, void *aux) { struct mca_attach_args *ma = (struct mca_attach_args *) aux; @@ -120,7 +120,7 @@ static const int smc_irq[] = { }; void -tiara_mca_attach(struct device *parent, struct device *self, void *aux) +tiara_mca_attach(device_t parent, device_t self, void *aux) { struct tiara_softc *isc = device_private(self); struct mb86950_softc *sc = &isc->sc_mb86950; diff --git a/sys/dev/mca/mca.c b/sys/dev/mca/mca.c index 59b607dfebf..b4c176e7996 100644 --- a/sys/dev/mca/mca.c +++ b/sys/dev/mca/mca.c @@ -1,4 +1,4 @@ -/* $NetBSD: mca.c,v 1.29 2009/05/12 13:15:24 cegger Exp $ */ +/* $NetBSD: mca.c,v 1.30 2009/05/12 14:31:00 cegger Exp $ */ /*- * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mca.c,v 1.29 2009/05/12 13:15:24 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mca.c,v 1.30 2009/05/12 14:31:00 cegger Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -50,8 +50,8 @@ __KERNEL_RCSID(0, "$NetBSD: mca.c,v 1.29 2009/05/12 13:15:24 cegger Exp $"); #include "locators.h" -int mca_match(struct device *, cfdata_t, void *); -void mca_attach(struct device *, struct device *, void *); +int mca_match(device_t, cfdata_t, void *); +void mca_attach(device_t, device_t, void *); CFATTACH_DECL(mca, sizeof(struct device), mca_match, mca_attach, NULL, NULL); @@ -59,7 +59,7 @@ CFATTACH_DECL(mca, sizeof(struct device), int mca_print(void *, const char *); int -mca_match(struct device *parent, cfdata_t cf, void *aux) +mca_match(device_t parent, cfdata_t cf, void *aux) { struct mcabus_attach_args *mba = aux; @@ -105,7 +105,7 @@ mca_print(void *aux, const char *pnp) } void -mca_attach(struct device *parent, struct device *self, void *aux) +mca_attach(device_t parent, device_t self, void *aux) { struct mcabus_attach_args *mba = aux; bus_space_tag_t iot, memt; diff --git a/sys/dev/mii/brgphy.c b/sys/dev/mii/brgphy.c index 395b42e2207..6ff5d566a19 100644 --- a/sys/dev/mii/brgphy.c +++ b/sys/dev/mii/brgphy.c @@ -1,4 +1,4 @@ -/* $NetBSD: brgphy.c,v 1.45 2009/05/12 13:16:02 cegger Exp $ */ +/* $NetBSD: brgphy.c,v 1.46 2009/05/12 14:31:27 cegger Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.45 2009/05/12 13:16:02 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.46 2009/05/12 14:31:27 cegger Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -187,7 +187,7 @@ static const struct mii_phydesc brgphys[] = { }; static int -brgphymatch(struct device *parent, cfdata_t match, +brgphymatch(device_t parent, cfdata_t match, void *aux) { struct mii_attach_args *ma = aux; @@ -199,7 +199,7 @@ brgphymatch(struct device *parent, cfdata_t match, } static void -brgphyattach(struct device *parent, struct device *self, void *aux) +brgphyattach(device_t parent, device_t self, void *aux) { struct brgphy_softc *bsc = device_private(self); struct mii_softc *sc = &bsc->sc_mii; diff --git a/sys/dev/mii/ciphy.c b/sys/dev/mii/ciphy.c index 1ad2a738850..52247f316e9 100644 --- a/sys/dev/mii/ciphy.c +++ b/sys/dev/mii/ciphy.c @@ -1,4 +1,4 @@ -/* $NetBSD: ciphy.c,v 1.18 2009/05/12 13:16:02 cegger Exp $ */ +/* $NetBSD: ciphy.c,v 1.19 2009/05/12 14:31:27 cegger Exp $ */ /*- * Copyright (c) 2004 @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.18 2009/05/12 13:16:02 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.19 2009/05/12 14:31:27 cegger Exp $"); /* * Driver for the Cicada CS8201 10/100/1000 copper PHY. @@ -97,7 +97,7 @@ static const struct mii_phydesc ciphys[] = { }; static int -ciphymatch(struct device *parent, cfdata_t match, +ciphymatch(device_t parent, cfdata_t match, void *aux) { struct mii_attach_args *ma = aux; @@ -109,7 +109,7 @@ ciphymatch(struct device *parent, cfdata_t match, } static void -ciphyattach(struct device *parent, struct device *self, void *aux) +ciphyattach(device_t parent, device_t self, void *aux) { struct mii_softc *sc = device_private(self); struct mii_attach_args *ma = aux; diff --git a/sys/dev/mii/mii_bitbang.h b/sys/dev/mii/mii_bitbang.h index 6b421856376..1222b7c4b16 100644 --- a/sys/dev/mii/mii_bitbang.h +++ b/sys/dev/mii/mii_bitbang.h @@ -1,4 +1,4 @@ -/* $NetBSD: mii_bitbang.h,v 1.5 2008/11/25 22:18:17 matt Exp $ */ +/* $NetBSD: mii_bitbang.h,v 1.6 2009/05/12 14:31:27 cegger Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -38,14 +38,14 @@ #define MII_NBITS 5 struct mii_bitbang_ops { - uint32_t (*mbo_read)(struct device *); - void (*mbo_write)(struct device *, uint32_t); + uint32_t (*mbo_read)(device_t); + void (*mbo_write)(device_t, uint32_t); uint32_t mbo_bits[MII_NBITS]; }; typedef const struct mii_bitbang_ops *mii_bitbang_ops_t; -int mii_bitbang_readreg(struct device *, mii_bitbang_ops_t, +int mii_bitbang_readreg(device_t, mii_bitbang_ops_t, int, int); -void mii_bitbang_writereg(struct device *, mii_bitbang_ops_t, +void mii_bitbang_writereg(device_t, mii_bitbang_ops_t, int, int, int); diff --git a/sys/dev/mii/mii_physubr.c b/sys/dev/mii/mii_physubr.c index f8d73ccedd8..c39838e8ff9 100644 --- a/sys/dev/mii/mii_physubr.c +++ b/sys/dev/mii/mii_physubr.c @@ -1,4 +1,4 @@ -/* $NetBSD: mii_physubr.c,v 1.63 2009/04/07 18:05:02 dyoung Exp $ */ +/* $NetBSD: mii_physubr.c,v 1.64 2009/05/12 14:31:27 cegger Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.63 2009/04/07 18:05:02 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.64 2009/05/12 14:31:27 cegger Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -534,7 +534,7 @@ mii_phy_delete_media(struct mii_softc *sc) } int -mii_phy_activate(struct device *self, enum devact act) +mii_phy_activate(device_t self, enum devact act) { int rv = 0; @@ -553,7 +553,7 @@ mii_phy_activate(struct device *self, enum devact act) /* ARGSUSED1 */ int -mii_phy_detach(struct device *self, int flags) +mii_phy_detach(device_t self, int flags) { struct mii_softc *sc = device_private(self); diff --git a/sys/dev/mii/miivar.h b/sys/dev/mii/miivar.h index a2c717a58e5..30f9552af96 100644 --- a/sys/dev/mii/miivar.h +++ b/sys/dev/mii/miivar.h @@ -1,4 +1,4 @@ -/* $NetBSD: miivar.h,v 1.54 2009/04/19 10:47:48 msaitoh Exp $ */ +/* $NetBSD: miivar.h,v 1.55 2009/05/12 14:31:27 cegger Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -45,9 +45,9 @@ struct mii_softc; /* * Callbacks from MII layer into network interface device driver. */ -typedef int (*mii_readreg_t)(struct device *, int, int); -typedef void (*mii_writereg_t)(struct device *, int, int, int); -typedef void (*mii_statchg_t)(struct device *); +typedef int (*mii_readreg_t)(device_t, int, int); +typedef void (*mii_writereg_t)(device_t, int, int, int); +typedef void (*mii_statchg_t)(device_t); /* * A network interface driver has one of these structures in its softc. diff --git a/sys/dev/mscp/mscp.c b/sys/dev/mscp/mscp.c index 43bcf31f734..7d4b09b8ef5 100644 --- a/sys/dev/mscp/mscp.c +++ b/sys/dev/mscp/mscp.c @@ -1,4 +1,4 @@ -/* $NetBSD: mscp.c,v 1.33 2009/04/18 14:58:03 tsutsui Exp $ */ +/* $NetBSD: mscp.c,v 1.34 2009/05/12 14:37:59 cegger Exp $ */ /* * Copyright (c) 1988 Regents of the University of California. @@ -76,7 +76,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mscp.c,v 1.33 2009/04/18 14:58:03 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mscp.c,v 1.34 2009/05/12 14:37:59 cegger Exp $"); #include <sys/param.h> #include <sys/buf.h> @@ -165,7 +165,7 @@ int mscp_aeb_xor = 0x8000bb80; void mscp_dorsp(struct mscp_softc *mi) { - struct device *drive; + device_t drive; struct mscp_device *me = mi->mi_me; struct mscp_ctlr *mc = mi->mi_mc; struct buf *bp; @@ -214,7 +214,7 @@ loop: */ if (mp->mscp_unit >= mi->mi_driveno) { /* Must expand drive table */ int tmpno = (mp->mscp_unit + 32) & ~31; - struct device **tmp = (struct device **) + device_t *tmp = (device_t *) malloc(tmpno * sizeof(tmp[0]), M_DEVBUF, M_NOWAIT|M_ZERO); /* XXX tmp should be checked for NULL */ if (mi->mi_driveno) { diff --git a/sys/dev/mscp/mscp_disk.c b/sys/dev/mscp/mscp_disk.c index a07f94ef6fa..2ec96944c39 100644 --- a/sys/dev/mscp/mscp_disk.c +++ b/sys/dev/mscp/mscp_disk.c @@ -1,4 +1,4 @@ -/* $NetBSD: mscp_disk.c,v 1.69 2009/05/12 13:16:17 cegger Exp $ */ +/* $NetBSD: mscp_disk.c,v 1.70 2009/05/12 14:37:59 cegger Exp $ */ /* * Copyright (c) 1988 Regents of the University of California. * All rights reserved. @@ -81,7 +81,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mscp_disk.c,v 1.69 2009/05/12 13:16:17 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mscp_disk.c,v 1.70 2009/05/12 14:37:59 cegger Exp $"); #include <sys/param.h> #include <sys/buf.h> @@ -126,14 +126,14 @@ struct ra_softc { #define rx_softc ra_softc -void rxattach(struct device *, struct device *, void *); +void rxattach(device_t, device_t, void *); int rx_putonline(struct rx_softc *); void rrmakelabel(struct disklabel *, long); #if NRA -int ramatch(struct device *, cfdata_t, void *); -void raattach(struct device *, struct device *, void *); +int ramatch(device_t, cfdata_t, void *); +void raattach(device_t, device_t, void *); int ra_putonline(struct ra_softc *); CFATTACH_DECL(ra, sizeof(struct ra_softc), @@ -166,7 +166,7 @@ static struct dkdriver radkdriver = { */ int -ramatch(struct device *parent, cfdata_t cf, void *aux) +ramatch(device_t parent, cfdata_t cf, void *aux) { struct drive_attach_args *da = aux; struct mscp *mp = da->da_mp; @@ -580,7 +580,7 @@ rasize(dev_t dev) #if NRX -int rxmatch(struct device *, cfdata_t, void *); +int rxmatch(device_t, cfdata_t, void *); CFATTACH_DECL(rx, sizeof(struct rx_softc), rxmatch, rxattach, NULL, NULL); @@ -611,7 +611,7 @@ static struct dkdriver rxdkdriver = { */ int -rxmatch(struct device *parent, cfdata_t cf, void *aux) +rxmatch(device_t parent, cfdata_t cf, void *aux) { struct drive_attach_args *da = aux; struct mscp *mp = da->da_mp; @@ -638,7 +638,7 @@ rxmatch(struct device *parent, cfdata_t cf, void *aux) * the first time. */ void -rxattach(struct device *parent, struct device *self, void *aux) +rxattach(device_t parent, device_t self, void *aux) { struct rx_softc *rx = device_private(self); struct drive_attach_args *da = aux; @@ -866,14 +866,14 @@ rxsize(dev_t dev) #endif /* NRX */ -void rrdgram(struct device *, struct mscp *, struct mscp_softc *); -void rriodone(struct device *, struct buf *); -int rronline(struct device *, struct mscp *); -int rrgotstatus(struct device *, struct mscp *); -void rrreplace(struct device *, struct mscp *); -int rrioerror(struct device *, struct mscp *, struct buf *); +void rrdgram(device_t, struct mscp *, struct mscp_softc *); +void rriodone(device_t, struct buf *); +int rronline(device_t, struct mscp *); +int rrgotstatus(device_t, struct mscp *); +void rrreplace(device_t, struct mscp *); +int rrioerror(device_t, struct mscp *, struct buf *); void rrfillin(struct buf *, struct mscp *); -void rrbb(struct device *, struct mscp *, struct buf *); +void rrbb(device_t, struct mscp *, struct buf *); struct mscp_device ra_device = { @@ -892,7 +892,7 @@ struct mscp_device ra_device = { * This can come from an unconfigured drive as well. */ void -rrdgram(struct device *usc, struct mscp *mp, struct mscp_softc *mi) +rrdgram(device_t usc, struct mscp *mp, struct mscp_softc *mi) { if (mscp_decodeerror(usc == NULL?"unconf disk" : device_xname(usc), mp, mi)) return; @@ -908,7 +908,7 @@ rrdgram(struct device *usc, struct mscp *mp, struct mscp_softc *mi) } void -rriodone(struct device *usc, struct buf *bp) +rriodone(device_t usc, struct buf *bp) { struct ra_softc *ra; int unit; @@ -939,7 +939,7 @@ rriodone(struct device *usc, struct buf *bp) * sleeping on the drive on-line-ness. */ int -rronline(struct device *usc, struct mscp *mp) +rronline(device_t usc, struct mscp *mp) { struct rx_softc *rx = (struct rx_softc *)usc; struct disklabel *dl; @@ -1006,7 +1006,7 @@ rrmakelabel(struct disklabel *dl, long type) * We got some (configured) unit's status. Return DONE if it succeeded. */ int -rrgotstatus(struct device *usc, struct mscp *mp) +rrgotstatus(device_t usc, struct mscp *mp) { if ((mp->mscp_status & M_ST_MASK) != M_ST_SUCCESS) { aprint_error_dev(usc, "attempt to get status failed: "); @@ -1025,7 +1025,7 @@ rrgotstatus(struct device *usc, struct mscp *mp) */ /*ARGSUSED*/ void -rrreplace(struct device *usc, struct mscp *mp) +rrreplace(device_t usc, struct mscp *mp) { panic("udareplace"); @@ -1037,7 +1037,7 @@ rrreplace(struct device *usc, struct mscp *mp) */ /*ARGSUSED*/ int -rrioerror(struct device *usc, struct mscp *mp, struct buf *bp) +rrioerror(device_t usc, struct mscp *mp, struct buf *bp) { struct ra_softc *ra = (void *)usc; int code = mp->mscp_event; @@ -1095,7 +1095,7 @@ rrfillin(struct buf *bp, struct mscp *mp) */ /*ARGSUSED*/ void -rrbb(struct device *usc, struct mscp *mp, struct buf *bp) +rrbb(device_t usc, struct mscp *mp, struct buf *bp) { panic("udabb"); diff --git a/sys/dev/mscp/mscp_subr.c b/sys/dev/mscp/mscp_subr.c index b88d91d2c9b..7237bd074b5 100644 --- a/sys/dev/mscp/mscp_subr.c +++ b/sys/dev/mscp/mscp_subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: mscp_subr.c,v 1.40 2009/05/12 13:16:17 cegger Exp $ */ +/* $NetBSD: mscp_subr.c,v 1.41 2009/05/12 14:37:59 cegger Exp $ */ /* * Copyright (c) 1988 Regents of the University of California. * All rights reserved. @@ -75,7 +75,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mscp_subr.c,v 1.40 2009/05/12 13:16:17 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mscp_subr.c,v 1.41 2009/05/12 14:37:59 cegger Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -97,8 +97,8 @@ __KERNEL_RCSID(0, "$NetBSD: mscp_subr.c,v 1.40 2009/05/12 13:16:17 cegger Exp $" #define b_forw b_hash.le_next -int mscp_match(struct device *, cfdata_t, void *); -void mscp_attach(struct device *, struct device *, void *); +int mscp_match(device_t, cfdata_t, void *); +void mscp_attach(device_t, device_t, void *); void mscp_start(struct mscp_softc *); int mscp_init(struct mscp_softc *); void mscp_initds(struct mscp_softc *); @@ -155,7 +155,7 @@ mscp_waitstep(struct mscp_softc *mi, int mask, int result) } int -mscp_match(struct device *parent, cfdata_t match, void *aux) +mscp_match(device_t parent, cfdata_t match, void *aux) { struct mscp_attach_args *ma = aux; @@ -171,7 +171,7 @@ mscp_match(struct device *parent, cfdata_t match, void *aux) }; void -mscp_attach(struct device *parent, struct device *self, void *aux) +mscp_attach(device_t parent, device_t self, void *aux) { struct mscp_attach_args *ma = aux; struct mscp_softc *mi = device_private(self); @@ -541,7 +541,7 @@ mscp_print(void *aux, const char *name) * common strategy routine for all types of MSCP devices. */ void -mscp_strategy(struct buf *bp, struct device *usc) +mscp_strategy(struct buf *bp, device_t usc) { struct mscp_softc *mi = (void *)usc; int s = spluba(); diff --git a/sys/dev/mscp/mscp_tape.c b/sys/dev/mscp/mscp_tape.c index 6febc9a5f4c..a6dd8204709 100644 --- a/sys/dev/mscp/mscp_tape.c +++ b/sys/dev/mscp/mscp_tape.c @@ -1,4 +1,4 @@ -/* $NetBSD: mscp_tape.c,v 1.37 2009/05/12 13:16:17 cegger Exp $ */ +/* $NetBSD: mscp_tape.c,v 1.38 2009/05/12 14:37:59 cegger Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mscp_tape.c,v 1.37 2009/05/12 13:16:17 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mscp_tape.c,v 1.38 2009/05/12 14:37:59 cegger Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -81,16 +81,16 @@ struct mt_softc { #define MT_OFFLINE 0 #define MT_ONLINE 1 -int mtmatch(struct device *, cfdata_t, void *); -void mtattach(struct device *, struct device *, void *); -void mtdgram(struct device *, struct mscp *, struct mscp_softc *); -void mtiodone(struct device *, struct buf *); -int mtonline(struct device *, struct mscp *); -int mtgotstatus(struct device *, struct mscp *); -int mtioerror(struct device *, struct mscp *, struct buf *); +int mtmatch(device_t, cfdata_t, void *); +void mtattach(device_t, device_t, void *); +void mtdgram(device_t, struct mscp *, struct mscp_softc *); +void mtiodone(device_t, struct buf *); +int mtonline(device_t, struct mscp *); +int mtgotstatus(device_t, struct mscp *); +int mtioerror(device_t, struct mscp *, struct buf *); void mtfillin(struct buf *, struct mscp *); int mtcmd(struct mt_softc *, int, int, int); -void mtcmddone(struct device *, struct mscp *); +void mtcmddone(device_t, struct mscp *); int mt_putonline(struct mt_softc *); struct mscp_device mt_device = { @@ -137,7 +137,7 @@ const struct cdevsw mt_cdevsw = { */ int -mtmatch(struct device *parent, cfdata_t cf, void *aux) +mtmatch(device_t parent, cfdata_t cf, void *aux) { struct drive_attach_args *da = aux; struct mscp *mp = da->da_mp; @@ -154,7 +154,7 @@ mtmatch(struct device *parent, cfdata_t cf, void *aux) * The attach routine only checks and prints drive type. */ void -mtattach(struct device *parent, struct device *self, void *aux) +mtattach(device_t parent, device_t self, void *aux) { struct mt_softc *mt = device_private(self); struct drive_attach_args *da = aux; @@ -286,7 +286,7 @@ mtwrite(dev_t dev, struct uio *uio, int flag) } void -mtiodone(struct device *usc, struct buf *bp) +mtiodone(device_t usc, struct buf *bp) { biodone(bp); @@ -315,7 +315,7 @@ mtfillin(struct buf *bp, struct mscp *mp) * Handle an error datagram. */ void -mtdgram(struct device *usc, struct mscp *mp, struct mscp_softc *mi) +mtdgram(device_t usc, struct mscp *mp, struct mscp_softc *mi) { if (mscp_decodeerror(usc == NULL?"unconf mt" : device_xname(usc), mp, mi)) return; @@ -326,7 +326,7 @@ mtdgram(struct device *usc, struct mscp *mp, struct mscp_softc *mi) * trying to use it. */ int -mtonline(struct device *usc, struct mscp *mp) +mtonline(device_t usc, struct mscp *mp) { struct mt_softc *mt = (void *)usc; @@ -341,7 +341,7 @@ mtonline(struct device *usc, struct mscp *mp) * We got some (configured) unit's status. Return DONE. */ int -mtgotstatus(struct device *usc, struct mscp *mp) +mtgotstatus(device_t usc, struct mscp *mp) { return (MSCP_DONE); } @@ -371,7 +371,7 @@ static const char *mt_ioerrs[] = { */ /*ARGSUSED*/ int -mtioerror(struct device *usc, struct mscp *mp, struct buf *bp) +mtioerror(device_t usc, struct mscp *mp, struct buf *bp) { struct mt_softc *mt = (void *)usc; int st = mp->mscp_status & M_ST_MASK; @@ -516,7 +516,7 @@ mtcmd(struct mt_softc *mt, int cmd, int count, int complete) * Called from bus routines whenever a non-data transfer is finished. */ void -mtcmddone(struct device *usc, struct mscp *mp) +mtcmddone(device_t usc, struct mscp *mp) { struct mt_softc *mt = (void *)usc; diff --git a/sys/dev/mscp/mscpvar.h b/sys/dev/mscp/mscpvar.h index b1809df74b6..feb7c8713ac 100644 --- a/sys/dev/mscp/mscpvar.h +++ b/sys/dev/mscp/mscpvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: mscpvar.h,v 1.16 2009/01/19 19:15:07 mjf Exp $ */ +/* $NetBSD: mscpvar.h,v 1.17 2009/05/12 14:37:59 cegger Exp $ */ /* * Copyright (c) 1988 Regents of the University of California. * All rights reserved. @@ -113,34 +113,34 @@ struct mscp_xi { struct mscp_ctlr { void (*mc_ctlrdone) /* controller operation complete */ - (struct device *); + (device_t); void (*mc_go) /* device-specific start routine */ - (struct device *, struct mscp_xi *); + (device_t, struct mscp_xi *); void (*mc_saerror) /* ctlr error handling */ - (struct device *, int); + (device_t, int); }; struct mscp_softc; struct mscp_device { void (*me_dgram) /* error datagram */ - (struct device *, struct mscp *, struct mscp_softc *); + (device_t, struct mscp *, struct mscp_softc *); void (*me_iodone) /* normal I/O is done */ - (struct device *, struct buf *); + (device_t, struct buf *); int (*me_online) /* drive on line */ - (struct device *, struct mscp *); + (device_t, struct mscp *); int (*me_gotstatus) /* got unit status */ - (struct device *, struct mscp *); + (device_t, struct mscp *); void (*me_replace) /* replace done */ - (struct device *, struct mscp *); + (device_t, struct mscp *); int (*me_ioerr) /* read or write failed */ - (struct device *, struct mscp *, struct buf *); + (device_t, struct mscp *, struct buf *); void (*me_bb) /* B_BAD io done */ - (struct device *, struct mscp *, struct buf *); + (device_t, struct mscp *, struct buf *); void (*me_fillin) /* Fill in mscp info for this drive */ (struct buf *,struct mscp *); void (*me_cmddone) /* Non-data transfer operation is done */ - (struct device *, struct mscp *); + (device_t, struct mscp *); }; /* @@ -286,7 +286,7 @@ void mscp_dorsp(struct mscp_softc *); int mscp_decodeerror(const char *, struct mscp *, struct mscp_softc *); int mscp_print(void *, const char *); void mscp_hexdump(struct mscp *); -void mscp_strategy(struct buf *, struct device *); +void mscp_strategy(struct buf *, device_t); void mscp_printtype(int, int); int mscp_waitstep(struct mscp_softc *, int, int); void mscp_dgo(struct mscp_softc *, struct mscp_xi *); |
