From 8fc35725733521389e5dd87c986097a7c24e0de8 Mon Sep 17 00:00:00 2001 From: thorpej Date: Wed, 29 Mar 2006 06:41:24 +0000 Subject: [PATCH] Use device_private(). --- sys/dev/i2c/adm1030.c | 6 +++--- sys/dev/i2c/adt7463.c | 6 +++--- sys/dev/i2c/adt7467.c | 6 +++--- sys/dev/i2c/at24cxx.c | 4 ++-- sys/dev/i2c/ds1307.c | 4 ++-- sys/dev/i2c/i2c.c | 4 ++-- sys/dev/i2c/lm75.c | 4 ++-- sys/dev/i2c/m41st84.c | 4 ++-- sys/dev/i2c/m41t00.c | 4 ++-- sys/dev/i2c/max6900.c | 4 ++-- sys/dev/i2c/pcf8583.c | 4 ++-- sys/dev/i2c/r2025.c | 6 +++--- sys/dev/i2c/rs5c372.c | 4 ++-- sys/dev/i2c/x1226.c | 6 +++--- sys/dev/i2o/dpti.c | 8 ++++---- sys/dev/i2o/iop.c | 6 +++--- sys/dev/i2o/iopl.c | 6 +++--- sys/dev/i2o/iopsp.c | 8 ++++---- sys/dev/i2o/ld_iop.c | 12 ++++++------ sys/dev/ir/cir.c | 10 +++++----- sys/dev/ir/irframe.c | 10 +++++----- 21 files changed, 63 insertions(+), 63 deletions(-) diff --git a/sys/dev/i2c/adm1030.c b/sys/dev/i2c/adm1030.c index e6b621da1db7..69e05c6ec5b4 100644 --- a/sys/dev/i2c/adm1030.c +++ b/sys/dev/i2c/adm1030.c @@ -1,4 +1,4 @@ -/* $NetBSD: adm1030.c,v 1.5 2006/02/17 18:45:40 macallan Exp $ */ +/* $NetBSD: adm1030.c,v 1.6 2006/03/29 06:41:24 thorpej Exp $ */ /*- * Copyright (C) 2005 Michael Lorenz. @@ -33,7 +33,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: adm1030.c,v 1.5 2006/02/17 18:45:40 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: adm1030.c,v 1.6 2006/03/29 06:41:24 thorpej Exp $"); #include #include @@ -85,7 +85,7 @@ adm1030c_attach(parent, self, aux) struct device *parent, *self; void *aux; { - struct adm1030c_softc *sc = (struct adm1030c_softc *)self; + struct adm1030c_softc *sc = device_private(self); struct i2c_attach_args *args = aux; sc->parent = parent; diff --git a/sys/dev/i2c/adt7463.c b/sys/dev/i2c/adt7463.c index 9e74e043b1ea..34d508c75d84 100644 --- a/sys/dev/i2c/adt7463.c +++ b/sys/dev/i2c/adt7463.c @@ -1,4 +1,4 @@ -/* $NetBSD: adt7463.c,v 1.2 2006/02/19 08:40:12 xtraeme Exp $ */ +/* $NetBSD: adt7463.c,v 1.3 2006/03/29 06:41:24 thorpej Exp $ */ /* * Copyright (c) 2005 Anil Gopinath (anil_public@yahoo.com) @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: adt7463.c,v 1.2 2006/02/19 08:40:12 xtraeme Exp $"); +__KERNEL_RCSID(0, "$NetBSD: adt7463.c,v 1.3 2006/03/29 06:41:24 thorpej Exp $"); /* Fan speed control added by Hanns Hartman */ #include @@ -87,7 +87,7 @@ adt7463c_match(struct device *parent, struct cfdata *cf, void *aux) static void adt7463c_attach(struct device *parent, struct device *self, void *aux) { - struct adt7463c_softc *sc = (struct adt7463c_softc *)self; + struct adt7463c_softc *sc = device_private(self); struct i2c_attach_args *ia = aux; int i = 0; diff --git a/sys/dev/i2c/adt7467.c b/sys/dev/i2c/adt7467.c index 7977f63772b8..7853fe4d8c05 100644 --- a/sys/dev/i2c/adt7467.c +++ b/sys/dev/i2c/adt7467.c @@ -1,4 +1,4 @@ -/* $NetBSD: adt7467.c,v 1.5 2006/02/17 18:45:40 macallan Exp $ */ +/* $NetBSD: adt7467.c,v 1.6 2006/03/29 06:41:24 thorpej Exp $ */ /*- * Copyright (C) 2005 Michael Lorenz @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: adt7467.c,v 1.5 2006/02/17 18:45:40 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: adt7467.c,v 1.6 2006/03/29 06:41:24 thorpej Exp $"); #include #include @@ -87,7 +87,7 @@ adt7467c_attach(parent, self, aux) struct device *parent, *self; void *aux; { - struct adt7467c_softc *sc = (struct adt7467c_softc *)self; + struct adt7467c_softc *sc = device_private(self); struct i2c_attach_args *args = aux; sc->parent = parent; diff --git a/sys/dev/i2c/at24cxx.c b/sys/dev/i2c/at24cxx.c index c23230e428e7..61519d44df47 100644 --- a/sys/dev/i2c/at24cxx.c +++ b/sys/dev/i2c/at24cxx.c @@ -1,4 +1,4 @@ -/* $NetBSD: at24cxx.c,v 1.4 2005/12/13 20:55:46 abs Exp $ */ +/* $NetBSD: at24cxx.c,v 1.5 2006/03/29 06:41:24 thorpej Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -109,7 +109,7 @@ seeprom_match(struct device *parent, struct cfdata *cf, void *aux) static void seeprom_attach(struct device *parent, struct device *self, void *aux) { - struct seeprom_softc *sc = (struct seeprom_softc *)self; + struct seeprom_softc *sc = device_private(self); struct i2c_attach_args *ia = aux; sc->sc_tag = ia->ia_tag; diff --git a/sys/dev/i2c/ds1307.c b/sys/dev/i2c/ds1307.c index 8134006abd4d..02acd6868d16 100644 --- a/sys/dev/i2c/ds1307.c +++ b/sys/dev/i2c/ds1307.c @@ -1,4 +1,4 @@ -/* $NetBSD: ds1307.c,v 1.4 2005/12/13 20:55:46 abs Exp $ */ +/* $NetBSD: ds1307.c,v 1.5 2006/03/29 06:41:24 thorpej Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -95,7 +95,7 @@ dsrtc_match(struct device *parent, struct cfdata *cf, void *arg) static void dsrtc_attach(struct device *parent, struct device *self, void *arg) { - struct dsrtc_softc *sc = (struct dsrtc_softc *)self; + struct dsrtc_softc *sc = device_private(self); struct i2c_attach_args *ia = arg; aprint_naive(": Real-time Clock/NVRAM\n"); diff --git a/sys/dev/i2c/i2c.c b/sys/dev/i2c/i2c.c index b0208d35fff3..039a06de2385 100644 --- a/sys/dev/i2c/i2c.c +++ b/sys/dev/i2c/i2c.c @@ -1,4 +1,4 @@ -/* $NetBSD: i2c.c,v 1.6 2006/03/27 23:59:38 jmcneill Exp $ */ +/* $NetBSD: i2c.c,v 1.7 2006/03/29 06:41:24 thorpej Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -103,7 +103,7 @@ iic_match(struct device *parent, struct cfdata *cf, void *aux) static void iic_attach(struct device *parent, struct device *self, void *aux) { - struct iic_softc *sc = (void *) self; + struct iic_softc *sc = device_private(self); struct i2cbus_attach_args *iba = aux; aprint_naive(": I2C bus\n"); diff --git a/sys/dev/i2c/lm75.c b/sys/dev/i2c/lm75.c index dd4e5808e916..6ba23415ecfd 100644 --- a/sys/dev/i2c/lm75.c +++ b/sys/dev/i2c/lm75.c @@ -1,4 +1,4 @@ -/* $NetBSD: lm75.c,v 1.5 2006/03/29 04:16:49 thorpej Exp $ */ +/* $NetBSD: lm75.c,v 1.6 2006/03/29 06:41:24 thorpej Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -91,7 +91,7 @@ lmtemp_match(struct device *parent, struct cfdata *cf, void *aux) static void lmtemp_attach(struct device *parent, struct device *self, void *aux) { - struct lmtemp_softc *sc = (struct lmtemp_softc *)self; + struct lmtemp_softc *sc = device_private(self); struct i2c_attach_args *ia = aux; int ptype; diff --git a/sys/dev/i2c/m41st84.c b/sys/dev/i2c/m41st84.c index 656fea54096c..d94807e633a1 100644 --- a/sys/dev/i2c/m41st84.c +++ b/sys/dev/i2c/m41st84.c @@ -1,4 +1,4 @@ -/* $NetBSD: m41st84.c,v 1.6 2005/12/13 20:55:46 abs Exp $ */ +/* $NetBSD: m41st84.c,v 1.7 2006/03/29 06:41:24 thorpej Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -95,7 +95,7 @@ strtc_match(struct device *parent, struct cfdata *cf, void *arg) static void strtc_attach(struct device *parent, struct device *self, void *arg) { - struct strtc_softc *sc = (struct strtc_softc *)self; + struct strtc_softc *sc = device_private(self); struct i2c_attach_args *ia = arg; aprint_naive(": Real-time Clock/NVRAM\n"); diff --git a/sys/dev/i2c/m41t00.c b/sys/dev/i2c/m41t00.c index 552de07f2d94..5af3acc3dd22 100644 --- a/sys/dev/i2c/m41t00.c +++ b/sys/dev/i2c/m41t00.c @@ -1,4 +1,4 @@ -/* $NetBSD: m41t00.c,v 1.5 2005/12/11 12:21:22 christos Exp $ */ +/* $NetBSD: m41t00.c,v 1.6 2006/03/29 06:41:24 thorpej Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -99,7 +99,7 @@ m41t00_match(struct device *parent, struct cfdata *cf, void *aux) void m41t00_attach(struct device *parent, struct device *self, void *aux) { - struct m41t00_softc *sc = (struct m41t00_softc *)self; + struct m41t00_softc *sc = device_private(self); struct i2c_attach_args *ia = aux; sc->sc_tag = ia->ia_tag; diff --git a/sys/dev/i2c/max6900.c b/sys/dev/i2c/max6900.c index 9ccac7ccef99..911b00d61203 100644 --- a/sys/dev/i2c/max6900.c +++ b/sys/dev/i2c/max6900.c @@ -1,4 +1,4 @@ -/* $NetBSD: max6900.c,v 1.4 2005/12/13 20:55:46 abs Exp $ */ +/* $NetBSD: max6900.c,v 1.5 2006/03/29 06:41:24 thorpej Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -95,7 +95,7 @@ maxrtc_match(struct device *parent, struct cfdata *cf, void *aux) void maxrtc_attach(struct device *parent, struct device *self, void *aux) { - struct maxrtc_softc *sc = (struct maxrtc_softc *)self; + struct maxrtc_softc *sc = device_private(self); struct i2c_attach_args *ia = aux; sc->sc_tag = ia->ia_tag; diff --git a/sys/dev/i2c/pcf8583.c b/sys/dev/i2c/pcf8583.c index 07dc43ff972f..d8b4174e37b2 100644 --- a/sys/dev/i2c/pcf8583.c +++ b/sys/dev/i2c/pcf8583.c @@ -1,4 +1,4 @@ -/* $NetBSD: pcf8583.c,v 1.3 2005/12/11 12:21:23 christos Exp $ */ +/* $NetBSD: pcf8583.c,v 1.4 2006/03/29 06:41:24 thorpej Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -105,7 +105,7 @@ pcfrtc_match(struct device *parent, struct cfdata *cf, void *aux) void pcfrtc_attach(struct device *parent, struct device *self, void *aux) { - struct pcfrtc_softc *sc = (struct pcfrtc_softc *)self; + struct pcfrtc_softc *sc = device_private(self); struct i2c_attach_args *ia = aux; uint8_t cmdbuf[1], csr; diff --git a/sys/dev/i2c/r2025.c b/sys/dev/i2c/r2025.c index 48c7bc3b53f5..2173a1153782 100644 --- a/sys/dev/i2c/r2025.c +++ b/sys/dev/i2c/r2025.c @@ -1,4 +1,4 @@ -/* $NetBSD: r2025.c,v 1.1 2006/03/06 19:55:08 shige Exp $ */ +/* $NetBSD: r2025.c,v 1.2 2006/03/29 06:41:24 thorpej Exp $ */ /*- * Copyright (c) 2006 Shigeyuki Fukushima. @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: r2025.c,v 1.1 2006/03/06 19:55:08 shige Exp $"); +__KERNEL_RCSID(0, "$NetBSD: r2025.c,v 1.2 2006/03/29 06:41:24 thorpej Exp $"); #include #include @@ -89,7 +89,7 @@ r2025rtc_match(struct device *parent, struct cfdata *cf, void *arg) static void r2025rtc_attach(struct device *parent, struct device *self, void *arg) { - struct r2025rtc_softc *sc = (struct r2025rtc_softc *)self; + struct r2025rtc_softc *sc = device_private(self); struct i2c_attach_args *ia = arg; aprint_normal(": RICOH R2025S/D Real-time Clock\n"); diff --git a/sys/dev/i2c/rs5c372.c b/sys/dev/i2c/rs5c372.c index eb29793b9a09..c0fcb8f58f5c 100644 --- a/sys/dev/i2c/rs5c372.c +++ b/sys/dev/i2c/rs5c372.c @@ -1,4 +1,4 @@ -/* $NetBSD: rs5c372.c,v 1.4 2005/12/11 12:21:23 christos Exp $ */ +/* $NetBSD: rs5c372.c,v 1.5 2006/03/29 06:41:24 thorpej Exp $ */ /* * Copyright (c) 2005 Kimihiro Nonaka @@ -74,7 +74,7 @@ rs5c372rtc_match(struct device *parent, struct cfdata *cf, void *arg) static void rs5c372rtc_attach(struct device *parent, struct device *self, void *arg) { - struct rs5c372rtc_softc *sc = (struct rs5c372rtc_softc *)self; + struct rs5c372rtc_softc *sc = device_private(self); struct i2c_attach_args *ia = arg; aprint_naive(": Real-time Clock\n"); diff --git a/sys/dev/i2c/x1226.c b/sys/dev/i2c/x1226.c index 56a243896f79..d716c1f894eb 100644 --- a/sys/dev/i2c/x1226.c +++ b/sys/dev/i2c/x1226.c @@ -1,4 +1,4 @@ -/* $NetBSD: x1226.c,v 1.7 2005/12/11 12:21:23 christos Exp $ */ +/* $NetBSD: x1226.c,v 1.8 2006/03/29 06:41:24 thorpej Exp $ */ /* * Copyright (c) 2003 Shigeyuki Fukushima. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: x1226.c,v 1.7 2005/12/11 12:21:23 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: x1226.c,v 1.8 2006/03/29 06:41:24 thorpej Exp $"); #include #include @@ -106,7 +106,7 @@ xrtc_match(struct device *parent, struct cfdata *cf, void *arg) static void xrtc_attach(struct device *parent, struct device *self, void *arg) { - struct xrtc_softc *sc = (struct xrtc_softc *)self; + struct xrtc_softc *sc = device_private(self); struct i2c_attach_args *ia = arg; aprint_naive(": Real-time Clock/NVRAM\n"); diff --git a/sys/dev/i2o/dpti.c b/sys/dev/i2o/dpti.c index 2096507acd51..5c713c2dd3e8 100644 --- a/sys/dev/i2o/dpti.c +++ b/sys/dev/i2o/dpti.c @@ -1,4 +1,4 @@ -/* $NetBSD: dpti.c,v 1.23 2006/03/28 17:38:30 thorpej Exp $ */ +/* $NetBSD: dpti.c,v 1.24 2006/03/29 06:45:05 thorpej Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dpti.c,v 1.23 2006/03/28 17:38:30 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dpti.c,v 1.24 2006/03/29 06:45:05 thorpej Exp $"); #include "opt_i2o.h" @@ -185,8 +185,8 @@ dpti_attach(struct device *parent, struct device *self, void *aux) } __attribute__ ((__packed__)) param; int rv; - sc = (struct dpti_softc *)self; - iop = (struct iop_softc *)parent; + sc = device_private(self); + iop = device_private(parent); /* * Tell the world what we are. The description in the signature diff --git a/sys/dev/i2o/iop.c b/sys/dev/i2o/iop.c index 764e2fa57980..bed21e7b04fe 100644 --- a/sys/dev/i2o/iop.c +++ b/sys/dev/i2o/iop.c @@ -1,4 +1,4 @@ -/* $NetBSD: iop.c,v 1.53 2006/03/28 17:38:30 thorpej Exp $ */ +/* $NetBSD: iop.c,v 1.54 2006/03/29 06:45:05 thorpej Exp $ */ /*- * Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: iop.c,v 1.53 2006/03/28 17:38:30 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: iop.c,v 1.54 2006/03/29 06:45:05 thorpej Exp $"); #include "opt_i2o.h" #include "iop.h" @@ -486,7 +486,7 @@ iop_config_interrupts(struct device *self) int rv, i, niop; int locs[IOPCF_NLOCS]; - sc = (struct iop_softc *)self; + sc = device_private(self); LIST_INIT(&sc->sc_iilist); printf("%s: configuring...\n", sc->sc_dv.dv_xname); diff --git a/sys/dev/i2o/iopl.c b/sys/dev/i2o/iopl.c index 812981bad748..c34685b369df 100644 --- a/sys/dev/i2o/iopl.c +++ b/sys/dev/i2o/iopl.c @@ -1,4 +1,4 @@ -/* $NetBSD: iopl.c,v 1.20 2006/03/25 23:04:31 thorpej Exp $ */ +/* $NetBSD: iopl.c,v 1.21 2006/03/29 06:45:05 thorpej Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -46,7 +46,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: iopl.c,v 1.20 2006/03/25 23:04:31 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: iopl.c,v 1.21 2006/03/29 06:45:05 thorpej Exp $"); #include "opt_i2o.h" #include "opt_inet.h" @@ -218,7 +218,7 @@ iopl_attach(struct device *parent, struct device *self, void *aux) u_int tmp; u_int32_t tmp1, tmp2, tmp3; - sc = (struct iopl_softc *)self; + sc = device_private(self); iop = (struct iop_softc *)parent; ia = (struct iop_attach_args *)aux; ifp = &sc->sc_if.sci_if; diff --git a/sys/dev/i2o/iopsp.c b/sys/dev/i2o/iopsp.c index d0c64c9c1d7e..38d0177850e1 100644 --- a/sys/dev/i2o/iopsp.c +++ b/sys/dev/i2o/iopsp.c @@ -1,4 +1,4 @@ -/* $NetBSD: iopsp.c,v 1.22 2006/03/25 23:04:31 thorpej Exp $ */ +/* $NetBSD: iopsp.c,v 1.23 2006/03/29 06:45:05 thorpej Exp $ */ /*- * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: iopsp.c,v 1.22 2006/03/25 23:04:31 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: iopsp.c,v 1.23 2006/03/29 06:45:05 thorpej Exp $"); #include "opt_i2o.h" @@ -136,8 +136,8 @@ iopsp_attach(struct device *parent, struct device *self, void *aux) #endif ia = (struct iop_attach_args *)aux; - sc = (struct iopsp_softc *)self; - iop = (struct iop_softc *)parent; + sc = device_private(self); + iop = device_private(parent); /* Register us as an initiator. */ sc->sc_ii.ii_dv = self; diff --git a/sys/dev/i2o/ld_iop.c b/sys/dev/i2o/ld_iop.c index 40befd7a034a..1529d3c2c625 100644 --- a/sys/dev/i2o/ld_iop.c +++ b/sys/dev/i2o/ld_iop.c @@ -1,4 +1,4 @@ -/* $NetBSD: ld_iop.c,v 1.19 2006/03/25 23:04:31 thorpej Exp $ */ +/* $NetBSD: ld_iop.c,v 1.20 2006/03/29 06:45:05 thorpej Exp $ */ /*- * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -43,7 +43,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ld_iop.c,v 1.19 2006/03/25 23:04:31 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ld_iop.c,v 1.20 2006/03/29 06:45:05 thorpej Exp $"); #include "opt_i2o.h" #include "rnd.h" @@ -146,9 +146,9 @@ ld_iop_attach(struct device *parent, struct device *self, void *aux) } p; } __attribute__ ((__packed__)) param; - sc = (struct ld_iop_softc *)self; + sc = device_private(self); ld = &sc->sc_ld; - iop = (struct iop_softc *)parent; + iop = device_private(parent); ia = (struct iop_attach_args *)aux; evreg = 0; @@ -334,8 +334,8 @@ ld_iop_detach(struct device *self, int flags) struct iop_softc *iop; int rv; - sc = (struct ld_iop_softc *)self; - iop = (struct iop_softc *)device_parent(self); + sc = device_private(self); + iop = device_private(device_parent(self)); if ((rv = ldbegindetach(&sc->sc_ld, flags)) != 0) return (rv); diff --git a/sys/dev/ir/cir.c b/sys/dev/ir/cir.c index c2c818d768b9..5ecc180651a5 100644 --- a/sys/dev/ir/cir.c +++ b/sys/dev/ir/cir.c @@ -1,4 +1,4 @@ -/* $NetBSD: cir.c,v 1.13 2006/03/28 17:38:33 thorpej Exp $ */ +/* $NetBSD: cir.c,v 1.14 2006/03/29 06:47:06 thorpej Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cir.c,v 1.13 2006/03/28 17:38:33 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cir.c,v 1.14 2006/03/29 06:47:06 thorpej Exp $"); #include #include @@ -89,7 +89,7 @@ cir_match(struct device *parent, struct cfdata *match, void *aux) void cir_attach(struct device *parent, struct device *self, void *aux) { - struct cir_softc *sc = (struct cir_softc *)self; + struct cir_softc *sc = device_private(self); struct ir_attach_args *ia = aux; sc->sc_methods = ia->ia_methods; @@ -107,7 +107,7 @@ cir_attach(struct device *parent, struct device *self, void *aux) int cir_activate(struct device *self, enum devact act) { - /*struct cir_softc *sc = (struct cir_softc *)self;*/ + /*struct cir_softc *sc = device_private(self);*/ switch (act) { case DVACT_ACTIVATE: @@ -123,7 +123,7 @@ cir_activate(struct device *self, enum devact act) int cir_detach(struct device *self, int flags) { - /*struct cir_softc *sc = (struct cir_softc *)self;*/ + /*struct cir_softc *sc = device_private(self);*/ int maj, mn; /* locate the major number */ diff --git a/sys/dev/ir/irframe.c b/sys/dev/ir/irframe.c index 9fec09be9bca..0becdf0d9b4f 100644 --- a/sys/dev/ir/irframe.c +++ b/sys/dev/ir/irframe.c @@ -1,4 +1,4 @@ -/* $NetBSD: irframe.c,v 1.32 2006/03/28 17:38:33 thorpej Exp $ */ +/* $NetBSD: irframe.c,v 1.33 2006/03/29 06:47:06 thorpej Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: irframe.c,v 1.32 2006/03/28 17:38:33 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: irframe.c,v 1.33 2006/03/29 06:47:06 thorpej Exp $"); #include "irframe.h" @@ -109,7 +109,7 @@ irframe_match(struct device *parent, struct cfdata *match, void *aux) void irframe_attach(struct device *parent, struct device *self, void *aux) { - struct irframe_softc *sc = (struct irframe_softc *)self; + struct irframe_softc *sc = device_private(self); struct ir_attach_args *ia = aux; const char *delim; int speeds = 0; @@ -153,7 +153,7 @@ irframe_attach(struct device *parent, struct device *self, void *aux) int irframe_activate(struct device *self, enum devact act) { - /*struct irframe_softc *sc = (struct irframe_softc *)self;*/ + /*struct irframe_softc *sc = device_private(self);*/ switch (act) { case DVACT_ACTIVATE: @@ -168,7 +168,7 @@ irframe_activate(struct device *self, enum devact act) int irframe_detach(struct device *self, int flags) { - /*struct irframe_softc *sc = (struct irframe_softc *)self;*/ + /*struct irframe_softc *sc = device_private(self);*/ int maj, mn; /* XXX needs reference count */