Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys fix device/softc split errors.
details: https://anonhg.NetBSD.org/src/rev/400115a0d1c6
branches: trunk
changeset: 782338:400115a0d1c6
user: chs <chs%NetBSD.org@localhost>
date: Mon Oct 29 12:51:38 2012 +0000
description:
fix device/softc split errors.
diffstat:
sys/arch/hpcsh/dev/hd64465/hd64465pcmcia.c | 6 +++---
sys/arch/hpcsh/dev/psh3pwr.c | 22 +++++++++-------------
sys/arch/mvme68k/dev/pcc.c | 6 +++---
sys/arch/sgimips/dev/zs_kbd.c | 6 +++---
sys/arch/sh3/dev/sci.c | 6 +++---
sys/arch/shark/shark/scr.c | 9 +++------
sys/dev/pci/if_lmc.c | 6 +++---
7 files changed, 27 insertions(+), 34 deletions(-)
diffs (246 lines):
diff -r 6b14024bcc71 -r 400115a0d1c6 sys/arch/hpcsh/dev/hd64465/hd64465pcmcia.c
--- a/sys/arch/hpcsh/dev/hd64465/hd64465pcmcia.c Mon Oct 29 05:25:19 2012 +0000
+++ b/sys/arch/hpcsh/dev/hd64465/hd64465pcmcia.c Mon Oct 29 12:51:38 2012 +0000
@@ -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 @@
}
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 =
diff -r 6b14024bcc71 -r 400115a0d1c6 sys/arch/hpcsh/dev/psh3pwr.c
--- a/sys/arch/hpcsh/dev/psh3pwr.c Mon Oct 29 05:25:19 2012 +0000
+++ b/sys/arch/hpcsh/dev/psh3pwr.c Mon Oct 29 12:51:38 2012 +0000
@@ -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 @@
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 @@
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 @@
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 @@
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);
diff -r 6b14024bcc71 -r 400115a0d1c6 sys/arch/mvme68k/dev/pcc.c
--- a/sys/arch/mvme68k/dev/pcc.c Mon Oct 29 05:25:19 2012 +0000
+++ b/sys/arch/mvme68k/dev/pcc.c Mon Oct 29 12:51:38 2012 +0000
@@ -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 @@
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;
diff -r 6b14024bcc71 -r 400115a0d1c6 sys/arch/sgimips/dev/zs_kbd.c
--- a/sys/arch/sgimips/dev/zs_kbd.c Mon Oct 29 05:25:19 2012 +0000
+++ b/sys/arch/sgimips/dev/zs_kbd.c Mon Oct 29 12:51:38 2012 +0000
@@ -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 @@
uint8_t dip;
/* wscons glue */
- device_t *wskbddev;
+ device_t wskbddev;
int enabled;
};
diff -r 6b14024bcc71 -r 400115a0d1c6 sys/arch/sh3/dev/sci.c
--- a/sys/arch/sh3/dev/sci.c Mon Oct 29 05:25:19 2012 +0000
+++ b/sys/arch/sh3/dev/sci.c Mon Oct 29 12:51:38 2012 +0000
@@ -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 @@
}
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)
diff -r 6b14024bcc71 -r 400115a0d1c6 sys/arch/shark/shark/scr.c
--- a/sys/arch/shark/shark/scr.c Mon Oct 29 05:25:19 2012 +0000
+++ b/sys/arch/shark/shark/scr.c Mon Oct 29 12:51:38 2012 +0000
@@ -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 @@
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 @@
}
#endif /* SCR_DEBUG */
-
-
-
diff -r 6b14024bcc71 -r 400115a0d1c6 sys/dev/pci/if_lmc.c
--- a/sys/dev/pci/if_lmc.c Mon Oct 29 05:25:19 2012 +0000
+++ b/sys/dev/pci/if_lmc.c Mon Oct 29 12:51:38 2012 +0000
@@ -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. <boggs%boggs.palo-alto.ca.us@localhost>
@@ -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 @@
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;
Home |
Main Index |
Thread Index |
Old Index