Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/acorn26 CFATTACH_DECL -> CFATTACH_DECL_NEW for 'str...



details:   https://anonhg.NetBSD.org/src/rev/2cc68812637d
branches:  trunk
changeset: 765701:2cc68812637d
user:      matt <matt%NetBSD.org@localhost>
date:      Fri Jun 03 07:08:48 2011 +0000

description:
CFATTACH_DECL -> CFATTACH_DECL_NEW for 'struct device' devices.
change to device_t, cfdata_t.  Use device_private()

diffstat:

 sys/arch/acorn26/acorn26/fpu.c |  14 +++++++-------
 sys/arch/acorn26/ioc/arckbd.c  |   8 ++++----
 sys/arch/acorn26/ioc/ioeb.c    |  18 +++++++++---------
 sys/arch/acorn26/ioc/ioebvar.h |   4 ++--
 sys/arch/acorn26/ioc/ssn.c     |  16 ++++++++--------
 5 files changed, 30 insertions(+), 30 deletions(-)

diffs (212 lines):

diff -r 7e67f2f25533 -r 2cc68812637d sys/arch/acorn26/acorn26/fpu.c
--- a/sys/arch/acorn26/acorn26/fpu.c    Fri Jun 03 06:39:52 2011 +0000
+++ b/sys/arch/acorn26/acorn26/fpu.c    Fri Jun 03 07:08:48 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fpu.c,v 1.12 2011/01/14 02:06:22 rmind Exp $   */
+/*     $NetBSD: fpu.c,v 1.13 2011/06/03 07:08:48 matt Exp $    */
 
 /*-
  * Copyright (c) 2000, 2001 Ben Harris
@@ -32,7 +32,7 @@
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.12 2011/01/14 02:06:22 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.13 2011/06/03 07:08:48 matt Exp $");
 
 #include <sys/device.h>
 #include <sys/proc.h>
@@ -46,8 +46,8 @@
 
 #include "opt_fputypes.h"
 
-static int fpu_match(struct device *, struct cfdata *, void *);
-static void fpu_attach(struct device *, struct device *, void *);
+static int fpu_match(device_t, cfdata_t, void *);
+static void fpu_attach(device_t, device_t, void *);
 static register_t fpu_identify(void);
 
 CFATTACH_DECL(fpu, sizeof(struct fpu_softc),
@@ -56,17 +56,17 @@
 struct fpu_softc *the_fpu;
 
 static int
-fpu_match(struct device *parent, struct cfdata *cf, void *aux)
+fpu_match(device_t parent, cfdata_t cf, void *aux)
 {
 
        return the_fpu == NULL && fpu_identify() != 0;
 }
 
 static void
-fpu_attach(struct device *parent, struct device *self, void *aux)
+fpu_attach(device_t parent, device_t self, void *aux)
 {
        int supported;
-       struct fpu_softc *sc = (void *)self;
+       struct fpu_softc *sc = device_private(self);
 
        the_fpu = sc;
        printf(": ");
diff -r 7e67f2f25533 -r 2cc68812637d sys/arch/acorn26/ioc/arckbd.c
--- a/sys/arch/acorn26/ioc/arckbd.c     Fri Jun 03 06:39:52 2011 +0000
+++ b/sys/arch/acorn26/ioc/arckbd.c     Fri Jun 03 07:08:48 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: arckbd.c,v 1.18 2009/02/16 21:36:09 bjh21 Exp $ */
+/* $NetBSD: arckbd.c,v 1.19 2011/06/03 07:08:48 matt Exp $ */
 /*-
  * Copyright (c) 1998, 1999, 2000 Ben Harris
  * All rights reserved.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arckbd.c,v 1.18 2009/02/16 21:36:09 bjh21 Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arckbd.c,v 1.19 2011/06/03 07:08:48 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -124,8 +124,8 @@
        enum arckbd_state       sc_state;
        u_char                  sc_byteone;
        u_char                  sc_kbid;
-       struct device           *sc_wskbddev;
-       struct device           *sc_wsmousedev;
+       device_t                sc_wskbddev;
+       device_t                sc_wsmousedev;
        struct wskbd_mapdata    sc_mapdata;
        int                     sc_cmdqueue;  /* Single-command queue */
        enum arckbd_state       sc_statequeue;
diff -r 7e67f2f25533 -r 2cc68812637d sys/arch/acorn26/ioc/ioeb.c
--- a/sys/arch/acorn26/ioc/ioeb.c       Fri Jun 03 06:39:52 2011 +0000
+++ b/sys/arch/acorn26/ioc/ioeb.c       Fri Jun 03 07:08:48 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ioeb.c,v 1.5 2002/10/02 03:25:47 thorpej Exp $ */
+/* $NetBSD: ioeb.c,v 1.6 2011/06/03 07:08:48 matt Exp $ */
 
 /*-
  * Copyright (c) 2000 Ben Harris
@@ -29,7 +29,7 @@
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: ioeb.c,v 1.5 2002/10/02 03:25:47 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ioeb.c,v 1.6 2011/06/03 07:08:48 matt Exp $");
 
 #include <sys/device.h>
 #include <sys/systm.h>
@@ -46,19 +46,19 @@
        bus_space_handle_t sc_ioh;
 };
 
-static int ioeb_match(struct device *, struct cfdata *, void *);
-static void ioeb_attach(struct device *, struct device *, void *);
+static int ioeb_match(device_t, cfdata_t, void *);
+static void ioeb_attach(device_t, device_t, void *);
 
 CFATTACH_DECL(ioeb, sizeof(struct ioeb_softc),
     ioeb_match, ioeb_attach, NULL, NULL);
 
-struct device *the_ioeb;
+device_t the_ioeb;
 
 /* IOEB is only four bits wide */
 #define ioeb_read(t, h, o) (bus_space_read_1(t, h, o) & 0xf)
 
 static int
-ioeb_match(struct device *parent, struct cfdata *cf, void *aux)
+ioeb_match(device_t parent, cfdata_t cf, void *aux)
 {
        struct ioc_attach_args *ioc = aux;
        int id;
@@ -72,9 +72,9 @@
 }
 
 static void
-ioeb_attach(struct device *parent, struct device *self, void *aux)
+ioeb_attach(device_t parent, device_t self, void *aux)
 {
-       struct ioeb_softc *sc = (void *)self;
+       struct ioeb_softc *sc = device_private(self);
        struct ioc_attach_args *ioc = aux;
 
        if (the_ioeb == NULL)
@@ -87,7 +87,7 @@
 void
 ioeb_irq_clear(int mask)
 {
-       struct ioeb_softc *sc = (void *)the_ioeb;
+       struct ioeb_softc *sc = device_private(the_ioeb);
 
        /* The IOEB only controls interrupt 0 */
        if (mask & IOEB_IRQ_CLEARABLE_MASK)
diff -r 7e67f2f25533 -r 2cc68812637d sys/arch/acorn26/ioc/ioebvar.h
--- a/sys/arch/acorn26/ioc/ioebvar.h    Fri Jun 03 06:39:52 2011 +0000
+++ b/sys/arch/acorn26/ioc/ioebvar.h    Fri Jun 03 07:08:48 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ioebvar.h,v 1.2 2002/03/24 23:37:44 bjh21 Exp $ */
+/* $NetBSD: ioebvar.h,v 1.3 2011/06/03 07:08:48 matt Exp $ */
 
 /*-
  * Copyright (c) 2000 Ben Harris
@@ -34,5 +34,5 @@
 
 extern void ioeb_irq_clear(int mask);
 
-extern struct device *the_ioeb;
+extern device_t the_ioeb;
 #endif
diff -r 7e67f2f25533 -r 2cc68812637d sys/arch/acorn26/ioc/ssn.c
--- a/sys/arch/acorn26/ioc/ssn.c        Fri Jun 03 06:39:52 2011 +0000
+++ b/sys/arch/acorn26/ioc/ssn.c        Fri Jun 03 07:08:48 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ssn.c,v 1.8 2005/12/11 12:16:04 christos Exp $ */
+/*     $NetBSD: ssn.c,v 1.9 2011/06/03 07:08:48 matt Exp $     */
 
 /*-
  * Copyright (c) 2002 Ben Harris
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ssn.c,v 1.8 2005/12/11 12:16:04 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ssn.c,v 1.9 2011/06/03 07:08:48 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -44,12 +44,12 @@
 struct ssn_softc {
        struct device sc_dev;
        struct ds_handle sc_dsh;
-       struct device *sc_ioc;
+       device_t sc_ioc;
        int sc_timebase;
 };
 
-static int ssn_match(struct device *, struct cfdata *, void *);
-static void ssn_attach(struct device *, struct device *, void *);
+static int ssn_match(device_t, cfdata_t, void *);
+static void ssn_attach(device_t, device_t, void *);
 
 CFATTACH_DECL(ssn, sizeof(struct ssn_softc),
     ssn_match, ssn_attach, NULL, NULL);
@@ -61,16 +61,16 @@
 static int ds_crc(const u_int8_t *data, size_t len);
 
 static int
-ssn_match(struct device *parent, struct cfdata *cf, void *aux)
+ssn_match(device_t parent, cfdata_t cf, void *aux)
 {
 
        return (1);
 }
 
 static void
-ssn_attach(struct device *parent, struct device *self, void *aux)
+ssn_attach(device_t parent, device_t self, void *aux)
 {
-       struct ssn_softc *sc = (void *)self;
+       struct ssn_softc *sc = device_private(self);
        int i;
        u_int8_t rombuf[8];
 



Home | Main Index | Thread Index | Old Index