Module Name:    src
Committed By:   matt
Date:           Fri Jun  3 07:08:49 UTC 2011

Modified Files:
        src/sys/arch/acorn26/acorn26: fpu.c
        src/sys/arch/acorn26/ioc: arckbd.c ioeb.c ioebvar.h ssn.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/acorn26/acorn26/fpu.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/acorn26/ioc/arckbd.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/acorn26/ioc/ioeb.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/acorn26/ioc/ioebvar.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/acorn26/ioc/ssn.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/acorn26/acorn26/fpu.c
diff -u src/sys/arch/acorn26/acorn26/fpu.c:1.12 src/sys/arch/acorn26/acorn26/fpu.c:1.13
--- src/sys/arch/acorn26/acorn26/fpu.c:1.12	Fri Jan 14 02:06:22 2011
+++ src/sys/arch/acorn26/acorn26/fpu.c	Fri Jun  3 07:08:48 2011
@@ -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(": ");

Index: src/sys/arch/acorn26/ioc/arckbd.c
diff -u src/sys/arch/acorn26/ioc/arckbd.c:1.18 src/sys/arch/acorn26/ioc/arckbd.c:1.19
--- src/sys/arch/acorn26/ioc/arckbd.c:1.18	Mon Feb 16 21:36:09 2009
+++ src/sys/arch/acorn26/ioc/arckbd.c	Fri Jun  3 07:08:48 2011
@@ -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;

Index: src/sys/arch/acorn26/ioc/ioeb.c
diff -u src/sys/arch/acorn26/ioc/ioeb.c:1.5 src/sys/arch/acorn26/ioc/ioeb.c:1.6
--- src/sys/arch/acorn26/ioc/ioeb.c:1.5	Wed Oct  2 03:25:47 2002
+++ src/sys/arch/acorn26/ioc/ioeb.c	Fri Jun  3 07:08:48 2011
@@ -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)

Index: src/sys/arch/acorn26/ioc/ioebvar.h
diff -u src/sys/arch/acorn26/ioc/ioebvar.h:1.2 src/sys/arch/acorn26/ioc/ioebvar.h:1.3
--- src/sys/arch/acorn26/ioc/ioebvar.h:1.2	Sun Mar 24 23:37:44 2002
+++ src/sys/arch/acorn26/ioc/ioebvar.h	Fri Jun  3 07:08:48 2011
@@ -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

Index: src/sys/arch/acorn26/ioc/ssn.c
diff -u src/sys/arch/acorn26/ioc/ssn.c:1.8 src/sys/arch/acorn26/ioc/ssn.c:1.9
--- src/sys/arch/acorn26/ioc/ssn.c:1.8	Sun Dec 11 12:16:04 2005
+++ src/sys/arch/acorn26/ioc/ssn.c	Fri Jun  3 07:08:48 2011
@@ -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];
 

Reply via email to