Module Name:    src
Committed By:   cegger
Date:           Tue Oct 20 10:34:21 UTC 2009

Modified Files:
        src/sys/arch/i386/pnpbios: ess_pnpbios.c

Log Message:
Use aprint_* when attaching. While here, unwrap some lines.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/i386/pnpbios/ess_pnpbios.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/i386/pnpbios/ess_pnpbios.c
diff -u src/sys/arch/i386/pnpbios/ess_pnpbios.c:1.19 src/sys/arch/i386/pnpbios/ess_pnpbios.c:1.20
--- src/sys/arch/i386/pnpbios/ess_pnpbios.c:1.19	Tue Jun 23 15:00:18 2009
+++ src/sys/arch/i386/pnpbios/ess_pnpbios.c	Tue Oct 20 10:34:21 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ess_pnpbios.c,v 1.19 2009/06/23 15:00:18 christos Exp $	*/
+/*	$NetBSD: ess_pnpbios.c,v 1.20 2009/10/20 10:34:21 cegger Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ess_pnpbios.c,v 1.19 2009/06/23 15:00:18 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ess_pnpbios.c,v 1.20 2009/10/20 10:34:21 cegger Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -62,8 +62,7 @@
     ess_pnpbios_match, ess_pnpbios_attach, NULL, NULL);
 
 int
-ess_pnpbios_match(device_t parent, cfdata_t match,
-    void *aux)
+ess_pnpbios_match(device_t parent, cfdata_t match, void *aux)
 {
 	struct pnpbiosdev_attach_args *aa = aux;
 
@@ -83,14 +82,13 @@
 }
 
 void
-ess_pnpbios_attach(device_t parent, device_t self,
-    void *aux)
+ess_pnpbios_attach(device_t parent, device_t self, void *aux)
 {
 	struct ess_softc *sc = device_private(self);
 	struct pnpbiosdev_attach_args *aa = aux;
 
 	if (pnpbios_io_map(aa->pbt, aa->resc, 0, &sc->sc_iot, &sc->sc_ioh)) {
-		printf(": can't map i/o space\n");
+		aprint_error(": can't map i/o space\n");
 		return;
 	}
 
@@ -104,7 +102,7 @@
 
 	if (pnpbios_getirqnum(aa->pbt, aa->resc, 0, &sc->sc_audio1.irq,
 	    NULL)) {
-		printf(": can't get IRQ\n");
+		aprint_error(": can't get IRQ\n");
 		return;
 	}
 
@@ -113,20 +111,21 @@
 		sc->sc_audio2.irq = -1;
 
 	if (pnpbios_getdmachan(aa->pbt, aa->resc, 0, &sc->sc_audio1.drq)) {
-		printf(": can't get DMA channel\n");
+		aprint_error(": can't get DMA channel\n");
 		return;
 	}
 
 	if (pnpbios_getdmachan(aa->pbt, aa->resc, 1, &sc->sc_audio2.drq))
 		sc->sc_audio2.drq = -1;
 
-	printf("\n");
+	aprint_naive("\n");
+	aprint_normal("\n");
 	pnpbios_print_devres(self, aa);
 
-	printf("%s", device_xname(self));
+	aprint_normal_dev(self, "");
 
 	if (!essmatch(sc)) {
-		aprint_error_dev(&sc->sc_dev, "essmatch failed\n");
+		aprint_error_dev(self, "essmatch failed\n");
 		pnpbios_io_unmap(aa->pbt, aa->resc, 0, sc->sc_iot, sc->sc_ioh);
 		return;
 	}

Reply via email to