Module Name:    src
Committed By:   tsutsui
Date:           Sat Oct 13 06:43:00 UTC 2012

Modified Files:
        src/sys/arch/x68k/dev: grf_machdep.c par.c

Log Message:
Normalize autoconf(9) function arg names (parent, self, and aux)
for clarification.  from chs@.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/x68k/dev/grf_machdep.c
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/x68k/dev/par.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/x68k/dev/grf_machdep.c
diff -u src/sys/arch/x68k/dev/grf_machdep.c:1.30 src/sys/arch/x68k/dev/grf_machdep.c:1.31
--- src/sys/arch/x68k/dev/grf_machdep.c:1.30	Tue Feb  8 20:20:25 2011
+++ src/sys/arch/x68k/dev/grf_machdep.c	Sat Oct 13 06:43:00 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: grf_machdep.c,v 1.30 2011/02/08 20:20:25 rmind Exp $	*/
+/*	$NetBSD: grf_machdep.c,v 1.31 2012/10/13 06:43:00 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1991 University of Utah.
@@ -44,7 +44,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: grf_machdep.c,v 1.30 2011/02/08 20:20:25 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: grf_machdep.c,v 1.31 2012/10/13 06:43:00 tsutsui Exp $");
 
 #include "locators.h"
 
@@ -79,32 +79,32 @@ CFATTACH_DECL_NEW(grf, sizeof(struct grf
 extern struct cfdriver grfbus_cd;
 
 int
-grfbusmatch(device_t pdp, cfdata_t cfp, void *auxp)
+grfbusmatch(device_t parent, cfdata_t cf, void *aux)
 {
-	if (strcmp(auxp, grfbus_cd.cd_name))
+	if (strcmp(aux, grfbus_cd.cd_name))
 		return (0);
 
 	return (1);
 }
 
 void
-grfbusattach(device_t pdp, device_t dp, void *auxp)
+grfbusattach(device_t parent, device_t self, void *aux)
 {
 
 	aprint_normal("\n");
-	config_search_ia(grfbussearch, dp, "grfb", NULL);
+	config_search_ia(grfbussearch, self, "grfb", NULL);
 }
 
 int
-grfbussearch(device_t dp, cfdata_t match, const int *ldesc, void *aux)
+grfbussearch(device_t self, cfdata_t match, const int *ldesc, void *aux)
 {
 
-	config_found(dp, &match->cf_loc[GRFBCF_ADDR], grfbusprint);
+	config_found(self, &match->cf_loc[GRFBCF_ADDR], grfbusprint);
 	return (0);
 }
 
 int
-grfbusprint(void *auxp, const char *name)
+grfbusprint(void *aux, const char *name)
 {
 
 	if (name == NULL)
@@ -130,17 +130,17 @@ grfmatch(device_t parent, cfdata_t cfp, 
 struct grf_softc congrf;
 
 void
-grfattach(device_t parent, device_t dp, void *aux)
+grfattach(device_t parent, device_t self, void *aux)
 {
 	struct grf_softc *gp;
 	struct cfdata *cf;
 	int addr;
 
-	cf = device_cfdata(dp);
+	cf = device_cfdata(self);
 	addr = cf->cf_loc[GRFBCF_ADDR];
 
-	gp = device_private(dp);
-	gp->g_device = dp;
+	gp = device_private(self);
+	gp->g_device = self;
 	gp->g_cfaddr = addr;
 	grfinit(gp, addr);
 
@@ -155,11 +155,11 @@ grfattach(device_t parent, device_t dp, 
 	/*
 	 * try and attach an ite
 	 */
-	config_found(dp, gp, grfprint);
+	config_found(self, gp, grfprint);
 }
 
 int
-grfprint(void *auxp, const char *pnp)
+grfprint(void *aux, const char *pnp)
 {
 
 	if (pnp)

Index: src/sys/arch/x68k/dev/par.c
diff -u src/sys/arch/x68k/dev/par.c:1.38 src/sys/arch/x68k/dev/par.c:1.39
--- src/sys/arch/x68k/dev/par.c:1.38	Sat Jan  9 09:16:32 2010
+++ src/sys/arch/x68k/dev/par.c	Sat Oct 13 06:43:00 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: par.c,v 1.38 2010/01/09 09:16:32 isaki Exp $	*/
+/*	$NetBSD: par.c,v 1.39 2012/10/13 06:43:00 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: par.c,v 1.38 2010/01/09 09:16:32 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: par.c,v 1.39 2012/10/13 06:43:00 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/errno.h>
@@ -130,7 +130,7 @@ const struct cdevsw par_cdevsw = {
 };
 
 int
-parmatch(device_t pdp, cfdata_t cfp, void *aux)
+parmatch(device_t parent, cfdata_t cf, void *aux)
 {
 	struct intio_attach_args *ia = aux;
 
@@ -141,7 +141,7 @@ parmatch(device_t pdp, cfdata_t cfp, voi
 	if (ia->ia_addr == INTIOCF_ADDR_DEFAULT)
 		ia->ia_addr = 0xe8c000;
 	ia->ia_size = 0x2000;
-	if (intio_map_allocate_region(pdp, ia, INTIO_MAP_TESTONLY))
+	if (intio_map_allocate_region(parent, ia, INTIO_MAP_TESTONLY))
 		return 0;
 	if (ia->ia_intr == INTIOCF_INTR_DEFAULT)
 		ia->ia_intr = 99;
@@ -154,19 +154,19 @@ parmatch(device_t pdp, cfdata_t cfp, voi
 }
 
 void
-parattach(device_t pdp, device_t dp, void *aux)
+parattach(device_t parent, device_t self, void *aux)
 {
-	struct par_softc *sc = device_private(dp);
+	struct par_softc *sc = device_private(self);
 	struct intio_attach_args *ia = aux;
 	int r;
 	
 	par_attached = 1;
 
-	sc->sc_dev = dp;
+	sc->sc_dev = self;
 	sc->sc_flags = PARF_ALIVE;
 	aprint_normal(": parallel port (write only, interrupt)\n");
 	ia->ia_size = 0x2000;
-	r = intio_map_allocate_region(pdp, ia, INTIO_MAP_ALLOCATE);
+	r = intio_map_allocate_region(parent, ia, INTIO_MAP_ALLOCATE);
 #ifdef DIAGNOSTIC
 	if (r)
 		panic("IO map for PAR corruption??");

Reply via email to