Source-Changes-HG archive

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

[src/trunk]: src/sys/dev use aprint_* in attach routines



details:   https://anonhg.NetBSD.org/src/rev/1e53e82e1b36
branches:  trunk
changeset: 747720:1e53e82e1b36
user:      cegger <cegger%NetBSD.org@localhost>
date:      Tue Sep 29 11:01:39 2009 +0000

description:
use aprint_* in attach routines

diffstat:

 sys/dev/isa/ess_isa.c       |  12 +++++++-----
 sys/dev/isapnp/ess_isapnp.c |  14 ++++++++------
 2 files changed, 15 insertions(+), 11 deletions(-)

diffs (94 lines):

diff -r 282897353fe0 -r 1e53e82e1b36 sys/dev/isa/ess_isa.c
--- a/sys/dev/isa/ess_isa.c     Mon Sep 28 20:30:01 2009 +0000
+++ b/sys/dev/isa/ess_isa.c     Tue Sep 29 11:01:39 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ess_isa.c,v 1.22 2009/05/05 12:07:15 cegger Exp $      */
+/*     $NetBSD: ess_isa.c,v 1.23 2009/09/29 11:01:39 cegger Exp $      */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ess_isa.c,v 1.22 2009/05/05 12:07:15 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ess_isa.c,v 1.23 2009/09/29 11:01:39 cegger Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -129,7 +129,9 @@
        sc = device_private(self);
        ia = aux;
        enablejoy = 0;
-       printf("\n");
+
+       aprint_naive("\n");
+       aprint_normal("\n");
 
        sc->sc_ic = ia->ia_ic;
        sc->sc_iot = ia->ia_iot;
@@ -148,7 +150,7 @@
        sc->sc_audio2.drq = ia->ia_ndrq > 1 ? ia->ia_drq[1].ir_drq : -1;
 
 #if NJOY_ESS > 0
-       if (device_cfdata(&sc->sc_dev)->cf_flags & 1) {
+       if (device_cfdata(self)->cf_flags & 1) {
                sc->sc_joy_iot = ia->ia_iot;
                if (!bus_space_map(sc->sc_joy_iot, 0x201, 1, 0,
                                   &sc->sc_joy_ioh))
@@ -156,7 +158,7 @@
        }
 #endif
 
-       printf("%s", device_xname(&sc->sc_dev));
+       aprint_normal_dev(self, "");
 
        essattach(sc, enablejoy);
 }
diff -r 282897353fe0 -r 1e53e82e1b36 sys/dev/isapnp/ess_isapnp.c
--- a/sys/dev/isapnp/ess_isapnp.c       Mon Sep 28 20:30:01 2009 +0000
+++ b/sys/dev/isapnp/ess_isapnp.c       Tue Sep 29 11:01:39 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ess_isapnp.c,v 1.20 2009/05/05 12:10:07 cegger Exp $   */
+/*     $NetBSD: ess_isapnp.c,v 1.21 2009/09/29 11:01:39 cegger Exp $   */
 
 /*
  * Copyright (c) 1991-1993 Regents of the University of California.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ess_isapnp.c,v 1.20 2009/05/05 12:10:07 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ess_isapnp.c,v 1.21 2009/09/29 11:01:39 cegger Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -98,10 +98,12 @@
 
        sc = device_private(self);
        ipa = aux;
-       printf("\n");
+
+       aprint_naive("\n");
+       aprint_normal("\n");
 
        if (isapnp_config(ipa->ipa_iot, ipa->ipa_memt, ipa)) {
-               aprint_error_dev(&sc->sc_dev, "error in region allocation\n");
+               aprint_error_dev(self, "error in region allocation\n");
                return;
        }
 
@@ -118,11 +120,11 @@
        sc->sc_audio2.drq = ipa->ipa_drq[1].num;
 
        if (!essmatch(sc)) {
-               aprint_error_dev(&sc->sc_dev, "essmatch failed\n");
+               aprint_error_dev(self, "essmatch failed\n");
                return;
        }
 
-       printf("%s", device_xname(&sc->sc_dev));
+       aprint_normal_dev(self, "");
 
        essattach(sc, 0);
 }



Home | Main Index | Thread Index | Old Index