Module Name: src Committed By: chs Date: Mon Oct 29 12:51:39 UTC 2012
Modified Files: src/sys/arch/hpcsh/dev: psh3pwr.c src/sys/arch/hpcsh/dev/hd64465: hd64465pcmcia.c src/sys/arch/mvme68k/dev: pcc.c src/sys/arch/sgimips/dev: zs_kbd.c src/sys/arch/sh3/dev: sci.c src/sys/arch/shark/shark: scr.c src/sys/dev/pci: if_lmc.c Log Message: fix device/softc split errors. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hpcsh/dev/psh3pwr.c cvs rdiff -u -r1.29 -r1.30 src/sys/arch/hpcsh/dev/hd64465/hd64465pcmcia.c cvs rdiff -u -r1.32 -r1.33 src/sys/arch/mvme68k/dev/pcc.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sgimips/dev/zs_kbd.c cvs rdiff -u -r1.55 -r1.56 src/sys/arch/sh3/dev/sci.c cvs rdiff -u -r1.27 -r1.28 src/sys/arch/shark/shark/scr.c cvs rdiff -u -r1.51 -r1.52 src/sys/dev/pci/if_lmc.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/hpcsh/dev/psh3pwr.c diff -u src/sys/arch/hpcsh/dev/psh3pwr.c:1.5 src/sys/arch/hpcsh/dev/psh3pwr.c:1.6 --- src/sys/arch/hpcsh/dev/psh3pwr.c:1.5 Sat Oct 27 17:17:56 2012 +++ src/sys/arch/hpcsh/dev/psh3pwr.c Mon Oct 29 12:51:38 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: psh3pwr.c,v 1.5 2012/10/27 17:17:56 chs Exp $ */ +/* $NetBSD: psh3pwr.c,v 1.6 2012/10/29 12:51:38 chs Exp $ */ /* * Copyright (c) 2005, 2007 KIYOHARA Takashi * All rights reserved. @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: psh3pwr.c,v 1.5 2012/10/27 17:17:56 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: psh3pwr.c,v 1.6 2012/10/29 12:51:38 chs Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -150,9 +150,9 @@ psh3pwr_attach(device_t parent, device_t aprint_normal("\n"); sc->sc_ih_pout = intc_intr_establish(SH7709_INTEVT2_IRQ0, - IST_EDGE, IPL_TTY, psh3pwr_intr_plug_out, sc); + IST_EDGE, IPL_TTY, psh3pwr_intr_plug_out, self); sc->sc_ih_pin = intc_intr_establish(SH7709_INTEVT2_IRQ1, - IST_EDGE, IPL_TTY, psh3pwr_intr_plug_in, sc); + IST_EDGE, IPL_TTY, psh3pwr_intr_plug_in, self); /* XXXX: WindowsCE sets this bit. */ aprint_normal_dev(self, "plug status: %s\n", @@ -164,10 +164,8 @@ psh3pwr_attach(device_t parent, device_t static int -psh3pwr_intr_plug_out(void *self) +psh3pwr_intr_plug_out(void *dev) { - struct psh3pwr_softc *sc __attribute__((__unused__)) = - (struct psh3pwr_softc *)self; uint8_t irr0, scpdr; irr0 = _reg_read_1(SH7709_IRR0); @@ -180,16 +178,14 @@ psh3pwr_intr_plug_out(void *self) scpdr = _reg_read_1(SH7709_SCPDR); _reg_write_1(SH7709_SCPDR, scpdr | PSH3PWR_PLUG_OUT); - DPRINTF(("%s: plug out\n", device_xname(sc->sc_dev))); + DPRINTF(("%s: plug out\n", device_xname(dev))); return 1; } static int -psh3pwr_intr_plug_in(void *self) +psh3pwr_intr_plug_in(void *dev) { - struct psh3pwr_softc *sc __attribute__((__unused__)) = - (struct psh3pwr_softc *)self; uint8_t irr0, scpdr; irr0 = _reg_read_1(SH7709_IRR0); @@ -201,13 +197,13 @@ psh3pwr_intr_plug_in(void *self) scpdr = _reg_read_1(SH7709_SCPDR); _reg_write_1(SH7709_SCPDR, scpdr & ~PSH3PWR_PLUG_OUT); - DPRINTF(("%s: plug in\n", device_xname(sc->sc_dev))); + DPRINTF(("%s: plug in\n", device_xname(dev))); return 1; } void -psh3pwr_sleep(void *self) +psh3pwr_sleep(void *v) { /* splhigh on entry */ extern void pfckbd_poll_hitachi_power(void); Index: src/sys/arch/hpcsh/dev/hd64465/hd64465pcmcia.c diff -u src/sys/arch/hpcsh/dev/hd64465/hd64465pcmcia.c:1.29 src/sys/arch/hpcsh/dev/hd64465/hd64465pcmcia.c:1.30 --- src/sys/arch/hpcsh/dev/hd64465/hd64465pcmcia.c:1.29 Sat Oct 27 17:17:56 2012 +++ src/sys/arch/hpcsh/dev/hd64465/hd64465pcmcia.c Mon Oct 29 12:51:38 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: hd64465pcmcia.c,v 1.29 2012/10/27 17:17:56 chs Exp $ */ +/* $NetBSD: hd64465pcmcia.c,v 1.30 2012/10/29 12:51:38 chs Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hd64465pcmcia.c,v 1.29 2012/10/27 17:17:56 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hd64465pcmcia.c,v 1.30 2012/10/29 12:51:38 chs Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -289,7 +289,7 @@ hd64465pcmcia_print(void *arg, const cha } int -hd64465pcmcia_submatch(device_t parent, cfdata_tcf, const int *ldesc, void *aux) +hd64465pcmcia_submatch(device_t parent, cfdata_t cf, const int *ldesc, void *aux) { struct pcmciabus_attach_args *paa = aux; struct hd64465pcmcia_channel *ch = Index: src/sys/arch/mvme68k/dev/pcc.c diff -u src/sys/arch/mvme68k/dev/pcc.c:1.32 src/sys/arch/mvme68k/dev/pcc.c:1.33 --- src/sys/arch/mvme68k/dev/pcc.c:1.32 Sat Oct 27 17:18:04 2012 +++ src/sys/arch/mvme68k/dev/pcc.c Mon Oct 29 12:51:38 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pcc.c,v 1.32 2012/10/27 17:18:04 chs Exp $ */ +/* $NetBSD: pcc.c,v 1.33 2012/10/29 12:51:38 chs Exp $ */ /* * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -59,7 +59,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pcc.c,v 1.32 2012/10/27 17:18:04 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pcc.c,v 1.33 2012/10/29 12:51:38 chs Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -163,7 +163,7 @@ pccattach(device_t parent, device_t self int i; ma = aux; - sc = sys_pcc = (struct pcc_softc *)self; + sc = sys_pcc = device_private(self); /* Get a handle to the PCC's registers. */ sc->sc_bust = ma->ma_bust; Index: src/sys/arch/sgimips/dev/zs_kbd.c diff -u src/sys/arch/sgimips/dev/zs_kbd.c:1.9 src/sys/arch/sgimips/dev/zs_kbd.c:1.10 --- src/sys/arch/sgimips/dev/zs_kbd.c:1.9 Sat Oct 27 17:18:09 2012 +++ src/sys/arch/sgimips/dev/zs_kbd.c Mon Oct 29 12:51:38 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: zs_kbd.c,v 1.9 2012/10/27 17:18:09 chs Exp $ */ +/* $NetBSD: zs_kbd.c,v 1.10 2012/10/29 12:51:38 chs Exp $ */ /* * Copyright (c) 2004 Steve Rumble @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: zs_kbd.c,v 1.9 2012/10/27 17:18:09 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: zs_kbd.c,v 1.10 2012/10/29 12:51:38 chs Exp $"); #include <sys/param.h> #include <sys/malloc.h> @@ -110,7 +110,7 @@ struct zskbd_devconfig { uint8_t dip; /* wscons glue */ - device_t *wskbddev; + device_t wskbddev; int enabled; }; Index: src/sys/arch/sh3/dev/sci.c diff -u src/sys/arch/sh3/dev/sci.c:1.55 src/sys/arch/sh3/dev/sci.c:1.56 --- src/sys/arch/sh3/dev/sci.c:1.55 Sat Oct 27 17:18:10 2012 +++ src/sys/arch/sh3/dev/sci.c Mon Oct 29 12:51:38 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: sci.c,v 1.55 2012/10/27 17:18:10 chs Exp $ */ +/* $NetBSD: sci.c,v 1.56 2012/10/29 12:51:38 chs Exp $ */ /*- * Copyright (C) 1999 T.Horiuchi and SAITOH Masanobu. All rights reserved. @@ -93,7 +93,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sci.c,v 1.55 2012/10/27 17:18:10 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sci.c,v 1.56 2012/10/29 12:51:38 chs Exp $"); #include "opt_kgdb.h" #include "opt_sci.h" @@ -358,7 +358,7 @@ sci_getc(void) } static int -sci_match(device_t parent, cfdata_t *cf, void *aux) +sci_match(device_t parent, cfdata_t cf, void *aux) { if (strcmp(cf->cf_name, "sci") || sci_attached) Index: src/sys/arch/shark/shark/scr.c diff -u src/sys/arch/shark/shark/scr.c:1.27 src/sys/arch/shark/shark/scr.c:1.28 --- src/sys/arch/shark/shark/scr.c:1.27 Tue Jan 31 04:28:50 2012 +++ src/sys/arch/shark/shark/scr.c Mon Oct 29 12:51:39 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: scr.c,v 1.27 2012/01/31 04:28:50 matt Exp $ */ +/* $NetBSD: scr.c,v 1.28 2012/10/29 12:51:39 chs Exp $ */ /* * Copyright 1997 @@ -102,7 +102,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: scr.c,v 1.27 2012/01/31 04:28:50 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: scr.c,v 1.28 2012/10/29 12:51:39 chs Exp $"); #include "opt_ddb.h" @@ -746,7 +746,7 @@ scrprobe(device_t parent, cfdata_t match void scrattach(device_t parent, device_t self, void *aux) { - struct scr_softc *sc = (void *)self; + struct scr_softc *sc = device_private(self); printf("\n"); if (device_is_a(parent, "ofisascr")) @@ -4016,6 +4016,3 @@ char * getText(int x) } #endif /* SCR_DEBUG */ - - - Index: src/sys/dev/pci/if_lmc.c diff -u src/sys/dev/pci/if_lmc.c:1.51 src/sys/dev/pci/if_lmc.c:1.52 --- src/sys/dev/pci/if_lmc.c:1.51 Sat Oct 27 17:18:33 2012 +++ src/sys/dev/pci/if_lmc.c Mon Oct 29 12:51:39 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: if_lmc.c,v 1.51 2012/10/27 17:18:33 chs Exp $ */ +/* $NetBSD: if_lmc.c,v 1.52 2012/10/29 12:51:39 chs Exp $ */ /*- * Copyright (c) 2002-2006 David Boggs. <bo...@boggs.palo-alto.ca.us> @@ -74,7 +74,7 @@ */ # include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_lmc.c,v 1.51 2012/10/27 17:18:33 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_lmc.c,v 1.52 2012/10/29 12:51:39 chs Exp $"); # include <sys/param.h> /* OS version */ # include "opt_inet.h" /* INET6, INET */ # include "opt_altq_enabled.h" /* ALTQ */ @@ -5406,7 +5406,7 @@ nbsd_match(device_t parent, cfdata_t mat static void nbsd_attach(device_t parent, device_t self, void *aux) { - softc_t *sc = (softc_t *)self; /* device is first in softc */ + softc_t *sc = device_private(self); struct pci_attach_args *pa = aux; const char *intrstr; bus_addr_t csr_addr;