summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorthorpej <thorpej@NetBSD.org>2006-03-29 06:28:38 +0000
committerthorpej <thorpej@NetBSD.org>2006-03-29 06:28:38 +0000
commit92c7bba3dffd4533c3852cefae11918b9bd84d1e (patch)
treea89895b07d7de989d5083923cea8849ffffc3f77 /sys/dev
parenta48de83500bb5d6dd2b759ee68753cd4f6149116 (diff)
Use device_private().
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/dec/dzkbd.c8
-rw-r--r--sys/dev/dec/dzms.c8
-rw-r--r--sys/dev/ebus/cs4231_ebus.c6
-rw-r--r--sys/dev/eisa/ahb.c6
-rw-r--r--sys/dev/eisa/ahc_eisa.c6
-rw-r--r--sys/dev/eisa/bha_eisa.c6
-rw-r--r--sys/dev/eisa/cac_eisa.c6
-rw-r--r--sys/dev/eisa/depca_eisa.c8
-rw-r--r--sys/dev/eisa/dpt_eisa.c6
-rw-r--r--sys/dev/eisa/if_ep_eisa.c6
-rw-r--r--sys/dev/eisa/if_fea.c6
-rw-r--r--sys/dev/eisa/if_tlp_eisa.c6
-rw-r--r--sys/dev/eisa/mlx_eisa.c6
-rw-r--r--sys/dev/eisa/uha_eisa.c6
-rw-r--r--sys/dev/gpib/cs80bus.c6
-rw-r--r--sys/dev/gpib/ct.c6
-rw-r--r--sys/dev/gpib/gpib.c6
-rw-r--r--sys/dev/gpib/hil_gpib.c6
-rw-r--r--sys/dev/gpib/mt.c6
-rw-r--r--sys/dev/gpib/ppi.c6
-rw-r--r--sys/dev/gpib/rd.c6
-rw-r--r--sys/dev/gpio/gpio.c8
-rw-r--r--sys/dev/hpc/bivideo.c6
-rw-r--r--sys/dev/hpc/btnmgr.c6
-rw-r--r--sys/dev/hpc/hpcapm.c6
-rw-r--r--sys/dev/hpc/hpcfb.c8
-rw-r--r--sys/dev/hpc/hpcin.c6
-rw-r--r--sys/dev/hpc/hpckbd.c6
-rw-r--r--sys/dev/hpc/hpcout.c6
-rw-r--r--sys/dev/hpc/hpf1275a_tty.c12
-rw-r--r--sys/dev/hpc/pwctl.c6
31 files changed, 101 insertions, 101 deletions
diff --git a/sys/dev/dec/dzkbd.c b/sys/dev/dec/dzkbd.c
index 84229c0d620..8c6e0bd5b48 100644
--- a/sys/dev/dec/dzkbd.c
+++ b/sys/dev/dec/dzkbd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dzkbd.c,v 1.15 2005/12/11 12:21:20 christos Exp $ */
+/* $NetBSD: dzkbd.c,v 1.16 2006/03/29 06:28:38 thorpej Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dzkbd.c,v 1.15 2005/12/11 12:21:20 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dzkbd.c,v 1.16 2006/03/29 06:28:38 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -147,8 +147,8 @@ dzkbd_match(struct device *parent, struct cfdata *cf, void *aux)
static void
dzkbd_attach(struct device *parent, struct device *self, void *aux)
{
- struct dz_softc *dz = (void *)parent;
- struct dzkbd_softc *dzkbd = (void *)self;
+ struct dz_softc *dz = device_private(parent);
+ struct dzkbd_softc *dzkbd = device_private(self);
struct dzkm_attach_args *daa = aux;
struct dz_linestate *ls;
struct dzkbd_internal *dzi;
diff --git a/sys/dev/dec/dzms.c b/sys/dev/dec/dzms.c
index baa23f01c91..afa2d98e431 100644
--- a/sys/dev/dec/dzms.c
+++ b/sys/dev/dec/dzms.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dzms.c,v 1.13 2005/12/11 12:21:20 christos Exp $ */
+/* $NetBSD: dzms.c,v 1.14 2006/03/29 06:28:38 thorpej Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dzms.c,v 1.13 2005/12/11 12:21:20 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dzms.c,v 1.14 2006/03/29 06:28:38 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -123,8 +123,8 @@ dzms_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct dz_softc *dz = (void *)parent;
- struct dzms_softc *dzms = (void *)self;
+ struct dz_softc *dz = device_private(parent);
+ struct dzms_softc *dzms = device_private(self);
struct dzkm_attach_args *daa = aux;
struct dz_linestate *ls;
struct wsmousedev_attach_args a;
diff --git a/sys/dev/ebus/cs4231_ebus.c b/sys/dev/ebus/cs4231_ebus.c
index 4b559b36116..47c68e7bcfa 100644
--- a/sys/dev/ebus/cs4231_ebus.c
+++ b/sys/dev/ebus/cs4231_ebus.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cs4231_ebus.c,v 1.19 2005/12/11 12:21:20 christos Exp $ */
+/* $NetBSD: cs4231_ebus.c,v 1.20 2006/03/29 06:29:20 thorpej Exp $ */
/*
* Copyright (c) 2002 Valeriy E. Ushakov
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cs4231_ebus.c,v 1.19 2005/12/11 12:21:20 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cs4231_ebus.c,v 1.20 2006/03/29 06:29:20 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -157,7 +157,7 @@ cs4231_ebus_attach(struct device *parent, struct device *self, void *aux)
bus_space_handle_t bh;
int i;
- ebsc = (struct cs4231_ebus_softc *)self;
+ ebsc = device_private(self);
sc = &ebsc->sc_cs4231;
ea = aux;
sc->sc_bustag = ebsc->sc_bt = ea->ea_bustag;
diff --git a/sys/dev/eisa/ahb.c b/sys/dev/eisa/ahb.c
index 0e6bf4af42c..f401e81389d 100644
--- a/sys/dev/eisa/ahb.c
+++ b/sys/dev/eisa/ahb.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ahb.c,v 1.44 2005/12/24 20:27:29 perry Exp $ */
+/* $NetBSD: ahb.c,v 1.45 2006/03/29 06:32:36 thorpej Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ahb.c,v 1.44 2005/12/24 20:27:29 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahb.c,v 1.45 2006/03/29 06:32:36 thorpej Exp $");
#include "opt_ddb.h"
@@ -191,7 +191,7 @@ static void
ahbattach(struct device *parent, struct device *self, void *aux)
{
struct eisa_attach_args *ea = aux;
- struct ahb_softc *sc = (void *)self;
+ struct ahb_softc *sc = device_private(self);
bus_space_tag_t iot = ea->ea_iot;
bus_space_handle_t ioh;
eisa_chipset_tag_t ec = ea->ea_ec;
diff --git a/sys/dev/eisa/ahc_eisa.c b/sys/dev/eisa/ahc_eisa.c
index 1543b018a83..33cc8fb2a10 100644
--- a/sys/dev/eisa/ahc_eisa.c
+++ b/sys/dev/eisa/ahc_eisa.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ahc_eisa.c,v 1.30 2005/12/11 12:21:20 christos Exp $ */
+/* $NetBSD: ahc_eisa.c,v 1.31 2006/03/29 06:32:36 thorpej Exp $ */
/*
* Product specific probe and attach routines for:
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ahc_eisa.c,v 1.30 2005/12/11 12:21:20 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahc_eisa.c,v 1.31 2006/03/29 06:32:36 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -95,7 +95,7 @@ ahc_eisa_match(struct device *parent, struct cfdata *match, void *aux)
static void
ahc_eisa_attach(struct device *parent, struct device *self, void *aux)
{
- struct ahc_softc *ahc = (void *)self;
+ struct ahc_softc *ahc = device_private(self);
struct eisa_attach_args *ea = aux;
eisa_chipset_tag_t ec = ea->ea_ec;
eisa_intr_handle_t ih;
diff --git a/sys/dev/eisa/bha_eisa.c b/sys/dev/eisa/bha_eisa.c
index c6668c6a75e..d3c22355ab8 100644
--- a/sys/dev/eisa/bha_eisa.c
+++ b/sys/dev/eisa/bha_eisa.c
@@ -1,4 +1,4 @@
-/* $NetBSD: bha_eisa.c,v 1.25 2005/12/11 12:21:20 christos Exp $ */
+/* $NetBSD: bha_eisa.c,v 1.26 2006/03/29 06:32:36 thorpej Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bha_eisa.c,v 1.25 2005/12/11 12:21:20 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bha_eisa.c,v 1.26 2006/03/29 06:32:36 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -145,7 +145,7 @@ static void
bha_eisa_attach(struct device *parent, struct device *self, void *aux)
{
struct eisa_attach_args *ea = aux;
- struct bha_softc *sc = (void *)self;
+ struct bha_softc *sc = device_private(self);
bus_space_tag_t iot = ea->ea_iot;
bus_space_handle_t ioh, ioh2;
int port;
diff --git a/sys/dev/eisa/cac_eisa.c b/sys/dev/eisa/cac_eisa.c
index 1f17cff6a74..efe848d7918 100644
--- a/sys/dev/eisa/cac_eisa.c
+++ b/sys/dev/eisa/cac_eisa.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cac_eisa.c,v 1.11 2005/12/11 12:21:20 christos Exp $ */
+/* $NetBSD: cac_eisa.c,v 1.12 2006/03/29 06:32:36 thorpej Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cac_eisa.c,v 1.11 2005/12/11 12:21:20 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cac_eisa.c,v 1.12 2006/03/29 06:32:36 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -147,7 +147,7 @@ cac_eisa_attach(struct device *parent, struct device *self, void *aux)
int irq, i;
ea = aux;
- sc = (struct cac_softc *)self;
+ sc = device_private(self);
iot = ea->ea_iot;
ec = ea->ea_ec;
diff --git a/sys/dev/eisa/depca_eisa.c b/sys/dev/eisa/depca_eisa.c
index 19e1c98a158..97c889228e2 100644
--- a/sys/dev/eisa/depca_eisa.c
+++ b/sys/dev/eisa/depca_eisa.c
@@ -1,4 +1,4 @@
-/* $NetBSD: depca_eisa.c,v 1.8 2005/12/11 12:21:20 christos Exp $ */
+/* $NetBSD: depca_eisa.c,v 1.9 2006/03/29 06:32:36 thorpej Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: depca_eisa.c,v 1.8 2005/12/11 12:21:20 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: depca_eisa.c,v 1.9 2006/03/29 06:32:36 thorpej Exp $");
#include "opt_inet.h"
#include "bpfilter.h"
@@ -107,8 +107,8 @@ depca_eisa_match(struct device *parent, struct cfdata *match, void *aux)
static void
depca_eisa_attach(struct device *parent, struct device *self, void *aux)
{
- struct depca_softc *sc = (void *) self;
- struct depca_eisa_softc *esc = (void *) self;
+ struct depca_softc *sc = device_private(self);
+ struct depca_eisa_softc *esc = device_private(self);
struct eisa_attach_args *ea = aux;
struct eisa_cfg_mem ecm;
struct eisa_cfg_irq eci;
diff --git a/sys/dev/eisa/dpt_eisa.c b/sys/dev/eisa/dpt_eisa.c
index decffce87c7..c6a7737435b 100644
--- a/sys/dev/eisa/dpt_eisa.c
+++ b/sys/dev/eisa/dpt_eisa.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dpt_eisa.c,v 1.13 2005/12/11 12:21:20 christos Exp $ */
+/* $NetBSD: dpt_eisa.c,v 1.14 2006/03/29 06:32:36 thorpej Exp $ */
/*
* Copyright (c) 1999, 2000, 2001 Andrew Doran <ad@NetBSD.org>
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dpt_eisa.c,v 1.13 2005/12/11 12:21:20 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dpt_eisa.c,v 1.14 2006/03/29 06:32:36 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -130,7 +130,7 @@ dpt_eisa_attach(struct device *parent, struct device *self, void *aux)
int irq;
ea = aux;
- sc = (struct dpt_softc *)self;
+ sc = device_private(self);
iot = ea->ea_iot;
ec = ea->ea_ec;
diff --git a/sys/dev/eisa/if_ep_eisa.c b/sys/dev/eisa/if_ep_eisa.c
index f9417e2b9f1..5bef97448b0 100644
--- a/sys/dev/eisa/if_ep_eisa.c
+++ b/sys/dev/eisa/if_ep_eisa.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ep_eisa.c,v 1.31 2005/12/11 12:21:20 christos Exp $ */
+/* $NetBSD: if_ep_eisa.c,v 1.32 2006/03/29 06:32:36 thorpej Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ep_eisa.c,v 1.31 2005/12/11 12:21:20 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ep_eisa.c,v 1.32 2006/03/29 06:32:36 thorpej Exp $");
#include "opt_inet.h"
#include "opt_ns.h"
@@ -212,7 +212,7 @@ ep_eisa_match(struct device *parent, struct cfdata *match, void *aux)
static void
ep_eisa_attach(struct device *parent, struct device *self, void *aux)
{
- struct ep_softc *sc = (void *)self;
+ struct ep_softc *sc = device_private(self);
struct eisa_attach_args *ea = aux;
bus_space_tag_t iot = ea->ea_iot;
bus_space_handle_t ioh, ioh_cfg;
diff --git a/sys/dev/eisa/if_fea.c b/sys/dev/eisa/if_fea.c
index bdd3bfae4b3..7fda4e89a33 100644
--- a/sys/dev/eisa/if_fea.c
+++ b/sys/dev/eisa/if_fea.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_fea.c,v 1.30 2005/12/11 12:21:20 christos Exp $ */
+/* $NetBSD: if_fea.c,v 1.31 2006/03/29 06:32:36 thorpej Exp $ */
/*-
* Copyright (c) 1995, 1996 Matt Thomas <matt@3am-software.com>
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_fea.c,v 1.30 2005/12/11 12:21:20 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_fea.c,v 1.31 2006/03/29 06:32:36 thorpej Exp $");
#include "opt_inet.h"
@@ -462,7 +462,7 @@ pdq_eisa_attach(
struct device *self,
void *aux)
{
- pdq_softc_t * const sc = (pdq_softc_t *) self;
+ pdq_softc_t * const sc = device_private(self);
struct eisa_attach_args * const ea = (struct eisa_attach_args *) aux;
pdq_uint32_t irq, maddr, msiz;
eisa_intr_handle_t ih;
diff --git a/sys/dev/eisa/if_tlp_eisa.c b/sys/dev/eisa/if_tlp_eisa.c
index 78aeefdb57d..8c4cea6ef60 100644
--- a/sys/dev/eisa/if_tlp_eisa.c
+++ b/sys/dev/eisa/if_tlp_eisa.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_tlp_eisa.c,v 1.14 2005/12/11 12:21:20 christos Exp $ */
+/* $NetBSD: if_tlp_eisa.c,v 1.15 2006/03/29 06:32:36 thorpej Exp $ */
/*-
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_tlp_eisa.c,v 1.14 2005/12/11 12:21:20 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tlp_eisa.c,v 1.15 2006/03/29 06:32:36 thorpej Exp $");
#include "opt_inet.h"
#include "opt_ns.h"
@@ -166,7 +166,7 @@ tlp_eisa_attach(struct device *parent, struct device *self, void *aux)
{
static const u_int8_t testpat[] =
{ 0xff, 0, 0x55, 0xaa, 0xff, 0, 0x55, 0xaa };
- struct tulip_eisa_softc *esc = (void *) self;
+ struct tulip_eisa_softc *esc = device_private(self);
struct tulip_softc *sc = &esc->sc_tulip;
struct eisa_attach_args *ea = aux;
eisa_chipset_tag_t ec = ea->ea_ec;
diff --git a/sys/dev/eisa/mlx_eisa.c b/sys/dev/eisa/mlx_eisa.c
index 1133b43a407..ef79f0d79a1 100644
--- a/sys/dev/eisa/mlx_eisa.c
+++ b/sys/dev/eisa/mlx_eisa.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mlx_eisa.c,v 1.14 2005/12/11 12:21:20 christos Exp $ */
+/* $NetBSD: mlx_eisa.c,v 1.15 2006/03/29 06:32:36 thorpej Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mlx_eisa.c,v 1.14 2005/12/11 12:21:20 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mlx_eisa.c,v 1.15 2006/03/29 06:32:36 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -126,7 +126,7 @@ mlx_eisa_attach(struct device *parent, struct device *self, void *aux)
int irq, i, icfg;
ea = aux;
- mlx = (struct mlx_softc *)self;
+ mlx = device_private(self);
iot = ea->ea_iot;
ec = ea->ea_ec;
diff --git a/sys/dev/eisa/uha_eisa.c b/sys/dev/eisa/uha_eisa.c
index e43cfceabef..7a6a8393e96 100644
--- a/sys/dev/eisa/uha_eisa.c
+++ b/sys/dev/eisa/uha_eisa.c
@@ -1,4 +1,4 @@
-/* $NetBSD: uha_eisa.c,v 1.23 2005/12/11 12:21:20 christos Exp $ */
+/* $NetBSD: uha_eisa.c,v 1.24 2006/03/29 06:32:36 thorpej Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uha_eisa.c,v 1.23 2005/12/11 12:21:20 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uha_eisa.c,v 1.24 2006/03/29 06:32:36 thorpej Exp $");
#include "opt_ddb.h"
@@ -116,7 +116,7 @@ static void
uha_eisa_attach(struct device *parent, struct device *self, void *aux)
{
struct eisa_attach_args *ea = aux;
- struct uha_softc *sc = (void *)self;
+ struct uha_softc *sc = device_private(self);
bus_space_tag_t iot = ea->ea_iot;
bus_dma_tag_t dmat = ea->ea_dmat;
bus_space_handle_t ioh;
diff --git a/sys/dev/gpib/cs80bus.c b/sys/dev/gpib/cs80bus.c
index de626f1955d..52113e487f3 100644
--- a/sys/dev/gpib/cs80bus.c
+++ b/sys/dev/gpib/cs80bus.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cs80bus.c,v 1.5 2006/03/25 22:59:59 thorpej Exp $ */
+/* $NetBSD: cs80bus.c,v 1.6 2006/03/29 06:33:50 thorpej Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cs80bus.c,v 1.5 2006/03/25 22:59:59 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cs80bus.c,v 1.6 2006/03/29 06:33:50 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -112,7 +112,7 @@ cs80busattach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct cs80bus_softc *sc = (struct cs80bus_softc *)self;
+ struct cs80bus_softc *sc = device_private(self);
struct gpib_attach_args *ga = aux;
struct cs80bus_attach_args ca;
int slave;
diff --git a/sys/dev/gpib/ct.c b/sys/dev/gpib/ct.c
index fb45fcf6fb3..49ba9a56838 100644
--- a/sys/dev/gpib/ct.c
+++ b/sys/dev/gpib/ct.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ct.c,v 1.7 2006/03/25 22:59:59 thorpej Exp $ */
+/* $NetBSD: ct.c,v 1.8 2006/03/29 06:33:50 thorpej Exp $ */
/*-
* Copyright (c) 1996-2003 The NetBSD Foundation, Inc.
@@ -128,7 +128,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ct.c,v 1.7 2006/03/25 22:59:59 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ct.c,v 1.8 2006/03/29 06:33:50 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -291,7 +291,7 @@ ctattach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct ct_softc *sc = (struct ct_softc *)self;
+ struct ct_softc *sc = device_private(self);
struct cs80bus_attach_args *ca = aux;
struct cs80_description csd;
char name[7];
diff --git a/sys/dev/gpib/gpib.c b/sys/dev/gpib/gpib.c
index c777b565b53..7136961f3a2 100644
--- a/sys/dev/gpib/gpib.c
+++ b/sys/dev/gpib/gpib.c
@@ -1,4 +1,4 @@
-/* $NetBSD: gpib.c,v 1.7 2006/03/29 04:16:48 thorpej Exp $ */
+/* $NetBSD: gpib.c,v 1.8 2006/03/29 06:33:50 thorpej Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gpib.c,v 1.7 2006/03/29 04:16:48 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gpib.c,v 1.8 2006/03/29 06:33:50 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -110,7 +110,7 @@ gpibattach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct gpib_softc *sc = (struct gpib_softc *)self;
+ struct gpib_softc *sc = device_private(self);
struct cfdata *cf = device_cfdata(&sc->sc_dev);
struct gpibdev_attach_args *gda = aux;
struct gpib_attach_args ga;
diff --git a/sys/dev/gpib/hil_gpib.c b/sys/dev/gpib/hil_gpib.c
index 4576ee8e1f8..593a644e4b1 100644
--- a/sys/dev/gpib/hil_gpib.c
+++ b/sys/dev/gpib/hil_gpib.c
@@ -1,7 +1,7 @@
-/* $NetBSD: hil_gpib.c,v 1.5 2006/03/28 17:38:30 thorpej Exp $ */
+/* $NetBSD: hil_gpib.c,v 1.6 2006/03/29 06:33:50 thorpej Exp $ */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hil_gpib.c,v 1.5 2006/03/28 17:38:30 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hil_gpib.c,v 1.6 2006/03/29 06:33:50 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -72,7 +72,7 @@ hilattach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct hil_softc *sc = (struct hil_softc *)self;
+ struct hil_softc *sc = device_private(self);
struct gpib_attach_args *ga = aux;
printf("\n");
diff --git a/sys/dev/gpib/mt.c b/sys/dev/gpib/mt.c
index 20d2cda24c1..cf0504844db 100644
--- a/sys/dev/gpib/mt.c
+++ b/sys/dev/gpib/mt.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mt.c,v 1.5 2005/12/11 12:21:21 christos Exp $ */
+/* $NetBSD: mt.c,v 1.6 2006/03/29 06:33:50 thorpej Exp $ */
/*-
* Copyright (c) 1996-2003 The NetBSD Foundation, Inc.
@@ -121,7 +121,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mt.c,v 1.5 2005/12/11 12:21:21 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mt.c,v 1.6 2006/03/29 06:33:50 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -263,7 +263,7 @@ mtattach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct mt_softc *sc = (struct mt_softc *)self;
+ struct mt_softc *sc = device_private(self);
struct cs80bus_attach_args *ca = aux;
int type;
diff --git a/sys/dev/gpib/ppi.c b/sys/dev/gpib/ppi.c
index f328dffa397..3551c1f59fb 100644
--- a/sys/dev/gpib/ppi.c
+++ b/sys/dev/gpib/ppi.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ppi.c,v 1.5 2006/03/28 17:38:30 thorpej Exp $ */
+/* $NetBSD: ppi.c,v 1.6 2006/03/29 06:33:50 thorpej Exp $ */
/*-
* Copyright (c) 1996-2003 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ppi.c,v 1.5 2006/03/28 17:38:30 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ppi.c,v 1.6 2006/03/29 06:33:50 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -164,7 +164,7 @@ ppiattach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct ppi_softc *sc = (struct ppi_softc *)self;
+ struct ppi_softc *sc = device_private(self);
struct gpib_attach_args *ga = aux;
printf("\n");
diff --git a/sys/dev/gpib/rd.c b/sys/dev/gpib/rd.c
index f47883cc4ba..b3a1a58d947 100644
--- a/sys/dev/gpib/rd.c
+++ b/sys/dev/gpib/rd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rd.c,v 1.10 2006/03/28 17:38:30 thorpej Exp $ */
+/* $NetBSD: rd.c,v 1.11 2006/03/29 06:33:50 thorpej Exp $ */
/*-
* Copyright (c) 1996-2003 The NetBSD Foundation, Inc.
@@ -118,7 +118,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.10 2006/03/28 17:38:30 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.11 2006/03/29 06:33:50 thorpej Exp $");
#include "rnd.h"
@@ -352,7 +352,7 @@ rdattach(parent, self, aux)
struct device *parent, *self;
void *aux;
{
- struct rd_softc *sc = (struct rd_softc *)self;
+ struct rd_softc *sc = device_private(self);
struct cs80bus_attach_args *ca = aux;
struct cs80_description csd;
char name[7];
diff --git a/sys/dev/gpio/gpio.c b/sys/dev/gpio/gpio.c
index d7f89415c61..7c1a29b8563 100644
--- a/sys/dev/gpio/gpio.c
+++ b/sys/dev/gpio/gpio.c
@@ -1,4 +1,4 @@
-/* $NetBSD: gpio.c,v 1.6 2006/03/28 17:38:30 thorpej Exp $ */
+/* $NetBSD: gpio.c,v 1.7 2006/03/29 06:34:28 thorpej Exp $ */
/* $OpenBSD: gpio.c,v 1.6 2006/01/14 12:33:49 grange Exp $ */
/*
@@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.6 2006/03/28 17:38:30 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.7 2006/03/29 06:34:28 thorpej Exp $");
/*
* General Purpose Input/Output framework.
@@ -78,7 +78,7 @@ gpio_match(struct device *parent, struct cfdata *cf, void *aux)
void
gpio_attach(struct device *parent, struct device *self, void *aux)
{
- struct gpio_softc *sc = (struct gpio_softc *)self;
+ struct gpio_softc *sc = device_private(self);
struct gpiobus_attach_args *gba = aux;
sc->sc_gc = gba->gba_gc;
@@ -116,7 +116,7 @@ gpio_detach(struct device *self, int flags)
int
gpio_activate(struct device *self, enum devact act)
{
- struct gpio_softc *sc = (struct gpio_softc *)self;
+ struct gpio_softc *sc = device_private(self);
switch (act) {
case DVACT_ACTIVATE:
diff --git a/sys/dev/hpc/bivideo.c b/sys/dev/hpc/bivideo.c
index 19787270086..fb9af778df2 100644
--- a/sys/dev/hpc/bivideo.c
+++ b/sys/dev/hpc/bivideo.c
@@ -1,4 +1,4 @@
-/* $NetBSD: bivideo.c,v 1.21 2005/12/11 12:21:22 christos Exp $ */
+/* $NetBSD: bivideo.c,v 1.22 2006/03/29 06:37:35 thorpej Exp $ */
/*-
* Copyright (c) 1999-2001
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bivideo.c,v 1.21 2005/12/11 12:21:22 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bivideo.c,v 1.22 2006/03/29 06:37:35 thorpej Exp $");
#define FBDEBUG
static const char _copyright[] __attribute__ ((unused)) =
@@ -150,7 +150,7 @@ bivideomatch(struct device *parent, struct cfdata *match, void *aux)
void
bivideoattach(struct device *parent, struct device *self, void *aux)
{
- struct bivideo_softc *sc = (struct bivideo_softc *)self;
+ struct bivideo_softc *sc = device_private(self);
struct hpcfb_attach_args ha;
if (attach_flag) {
diff --git a/sys/dev/hpc/btnmgr.c b/sys/dev/hpc/btnmgr.c
index 202ad28b944..46662371c7b 100644
--- a/sys/dev/hpc/btnmgr.c
+++ b/sys/dev/hpc/btnmgr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: btnmgr.c,v 1.15 2005/12/11 12:21:22 christos Exp $ */
+/* $NetBSD: btnmgr.c,v 1.16 2006/03/29 06:37:35 thorpej Exp $ */
/*-
* Copyright (c) 1999
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: btnmgr.c,v 1.15 2005/12/11 12:21:22 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: btnmgr.c,v 1.16 2006/03/29 06:37:35 thorpej Exp $");
#define BTNMGRDEBUG
@@ -185,7 +185,7 @@ void
btnmgrattach(struct device *parent, struct device *self, void *aux)
{
int id;
- struct btnmgr_softc *sc = (struct btnmgr_softc *)self;
+ struct btnmgr_softc *sc = device_private(self);
struct wskbddev_attach_args wa;
printf("\n");
diff --git a/sys/dev/hpc/hpcapm.c b/sys/dev/hpc/hpcapm.c
index f567853bc60..c72aed851d6 100644
--- a/sys/dev/hpc/hpcapm.c
+++ b/sys/dev/hpc/hpcapm.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hpcapm.c,v 1.6 2006/02/27 02:30:39 peter Exp $ */
+/* $NetBSD: hpcapm.c,v 1.7 2006/03/29 06:37:35 thorpej Exp $ */
/*
* Copyright (c) 2000 Takemura Shin
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hpcapm.c,v 1.6 2006/02/27 02:30:39 peter Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hpcapm.c,v 1.7 2006/03/29 06:37:35 thorpej Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -113,7 +113,7 @@ hpcapm_attach(struct device *parent, struct device *self, void *aux)
struct apmhpc_softc *sc;
struct apmdev_attach_args aaa;
- sc = (struct apmhpc_softc *)self;
+ sc = device_private(self);
printf(": pseudo power management module\n");
sc->events = 0;
diff --git a/sys/dev/hpc/hpcfb.c b/sys/dev/hpc/hpcfb.c
index 224786894f2..cf1d7b2199d 100644
--- a/sys/dev/hpc/hpcfb.c
+++ b/sys/dev/hpc/hpcfb.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hpcfb.c,v 1.34 2005/12/11 12:21:22 christos Exp $ */
+/* $NetBSD: hpcfb.c,v 1.35 2006/03/29 06:37:35 thorpej Exp $ */
/*-
* Copyright (c) 1999
@@ -43,13 +43,13 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hpcfb.c,v 1.34 2005/12/11 12:21:22 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hpcfb.c,v 1.35 2006/03/29 06:37:35 thorpej Exp $");
#define FBDEBUG
static const char _copyright[] __attribute__ ((unused)) =
"Copyright (c) 1999 Shin Takemura. All rights reserved.";
static const char _rcsid[] __attribute__ ((unused)) =
- "$NetBSD: hpcfb.c,v 1.34 2005/12/11 12:21:22 christos Exp $";
+ "$NetBSD: hpcfb.c,v 1.35 2006/03/29 06:37:35 thorpej Exp $";
#include <sys/param.h>
#include <sys/systm.h>
@@ -292,7 +292,7 @@ hpcfbmatch(struct device *parent, struct cfdata *match, void *aux)
void
hpcfbattach(struct device *parent, struct device *self, void *aux)
{
- struct hpcfb_softc *sc = (struct hpcfb_softc *)self;
+ struct hpcfb_softc *sc = device_private(self);
struct hpcfb_attach_args *ha = aux;
struct wsemuldisplaydev_attach_args wa;
diff --git a/sys/dev/hpc/hpcin.c b/sys/dev/hpc/hpcin.c
index bc16212a08d..1eca97ff0e0 100644
--- a/sys/dev/hpc/hpcin.c
+++ b/sys/dev/hpc/hpcin.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hpcin.c,v 1.8 2002/10/02 16:33:49 thorpej Exp $ */
+/* $NetBSD: hpcin.c,v 1.9 2006/03/29 06:37:35 thorpej Exp $ */
/*-
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hpcin.c,v 1.8 2002/10/02 16:33:49 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hpcin.c,v 1.9 2006/03/29 06:37:35 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -85,7 +85,7 @@ void
hpcin_attach(struct device *parent, struct device *self, void *aux)
{
struct hpcioman_attach_args *hma = aux;
- struct hpcin_softc *sc = (void *)self;
+ struct hpcin_softc *sc = device_private(self);
if (hma->hma_hc == NULL ||
hma->hma_type == HPCIOMANCF_EVTYPE_DEFAULT ||
diff --git a/sys/dev/hpc/hpckbd.c b/sys/dev/hpc/hpckbd.c
index ccbe5143753..73eb8ab8a41 100644
--- a/sys/dev/hpc/hpckbd.c
+++ b/sys/dev/hpc/hpckbd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hpckbd.c,v 1.16 2006/02/13 16:35:57 uwe Exp $ */
+/* $NetBSD: hpckbd.c,v 1.17 2006/03/29 06:37:35 thorpej Exp $ */
/*-
* Copyright (c) 1999-2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hpckbd.c,v 1.16 2006/02/13 16:35:57 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hpckbd.c,v 1.17 2006/03/29 06:37:35 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -155,7 +155,7 @@ void
hpckbd_attach(struct device *parent, struct device *self, void *aux)
{
struct hpckbd_attach_args *haa = aux;
- struct hpckbd_softc *sc = (void*)self;
+ struct hpckbd_softc *sc = device_private(self);
struct hpckbd_ic_if *ic = haa->haa_ic;
struct wskbddev_attach_args wa;
diff --git a/sys/dev/hpc/hpcout.c b/sys/dev/hpc/hpcout.c
index cca2ce48b3d..4eca9a75d84 100644
--- a/sys/dev/hpc/hpcout.c
+++ b/sys/dev/hpc/hpcout.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hpcout.c,v 1.9 2005/12/11 12:21:22 christos Exp $ */
+/* $NetBSD: hpcout.c,v 1.10 2006/03/29 06:37:35 thorpej Exp $ */
/*-
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hpcout.c,v 1.9 2005/12/11 12:21:22 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hpcout.c,v 1.10 2006/03/29 06:37:35 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -82,7 +82,7 @@ void
hpcout_attach(struct device *parent, struct device *self, void *aux)
{
struct hpcioman_attach_args *hma = aux;
- struct hpcout_softc *sc = (void *)self;
+ struct hpcout_softc *sc = device_private(self);
sc->sc_hma = *hma; /* structure assignment */
diff --git a/sys/dev/hpc/hpf1275a_tty.c b/sys/dev/hpc/hpf1275a_tty.c
index 73d4af63298..6655a6d8beb 100644
--- a/sys/dev/hpc/hpf1275a_tty.c
+++ b/sys/dev/hpc/hpf1275a_tty.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hpf1275a_tty.c,v 1.6 2006/03/14 23:03:45 uwe Exp $ */
+/* $NetBSD: hpf1275a_tty.c,v 1.7 2006/03/29 06:37:35 thorpej Exp $ */
/*
* Copyright (c) 2004 Valeriy E. Ushakov
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hpf1275a_tty.c,v 1.6 2006/03/14 23:03:45 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hpf1275a_tty.c,v 1.7 2006/03/29 06:37:35 thorpej Exp $");
#include "opt_wsdisplay_compat.h"
@@ -257,7 +257,7 @@ hpf1275a_match(struct device *self, struct cfdata *cfdata, void *arg)
static void
hpf1275a_attach(struct device *parent, struct device *self, void *aux)
{
- struct hpf1275a_softc *sc = (struct hpf1275a_softc *)self;
+ struct hpf1275a_softc *sc = device_private(self);
struct wskbddev_attach_args wska;
wska.console = 0;
@@ -279,7 +279,7 @@ hpf1275a_attach(struct device *parent, struct device *self, void *aux)
static int
hpf1275a_detach(struct device *self, int flags)
{
- struct hpf1275a_softc *sc = (struct hpf1275a_softc *)self;
+ struct hpf1275a_softc *sc = device_private(self);
int error;
if (sc->sc_wskbd == NULL)
@@ -399,7 +399,7 @@ hpf1275a_input(int c, struct tty *tp)
static int
hpf1275a_wskbd_enable(void *self, int on)
{
- struct hpf1275a_softc *sc = (struct hpf1275a_softc *)self;
+ struct hpf1275a_softc *sc = self;
sc->sc_enabled = on;
return (0);
@@ -421,7 +421,7 @@ hpf1275a_wskbd_ioctl(void *self, u_long cmd, caddr_t data, int flag,
struct lwp *l)
{
#ifdef WSDISPLAY_COMPAT_RAWKBD
- struct hpf1275a_softc *sc = (struct hpf1275a_softc *)self;
+ struct hpf1275a_softc *sc = self;
#endif
switch (cmd) {
diff --git a/sys/dev/hpc/pwctl.c b/sys/dev/hpc/pwctl.c
index 30c17d8161f..2f1cf162603 100644
--- a/sys/dev/hpc/pwctl.c
+++ b/sys/dev/hpc/pwctl.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pwctl.c,v 1.14 2006/03/29 04:16:49 thorpej Exp $ */
+/* $NetBSD: pwctl.c,v 1.15 2006/03/29 06:37:35 thorpej Exp $ */
/*-
* Copyright (c) 1999-2001
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pwctl.c,v 1.14 2006/03/29 04:16:49 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pwctl.c,v 1.15 2006/03/29 06:37:35 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -109,7 +109,7 @@ pwctl_attach(struct device *parent, struct device *self, void *aux)
{
struct hpcio_attach_args *haa = aux;
int *loc;
- struct pwctl_softc *sc = (void*)self;
+ struct pwctl_softc *sc = device_private(self);
loc = device_cfdata(&sc->sc_dev)->cf_loc;
sc->sc_hc = (*haa->haa_getchip)(haa->haa_sc, loc[HPCIOIFCF_IOCHIP]);