Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/mips/alchemy/dev Use device_t instead of 'struct de...



details:   https://anonhg.NetBSD.org/src/rev/965295cb6f1f
branches:  trunk
changeset: 772431:965295cb6f1f
user:      kiyohara <kiyohara%NetBSD.org@localhost>
date:      Wed Jan 04 02:36:26 2012 +0000

description:
Use device_t instead of 'struct device *'.
Remove unnecessary \n.

diffstat:

 sys/arch/mips/alchemy/dev/aupcmcia.c |  11 +++++------
 sys/arch/mips/alchemy/dev/auspi.c    |  14 +++++++-------
 2 files changed, 12 insertions(+), 13 deletions(-)

diffs (100 lines):

diff -r b66c05d23b5b -r 965295cb6f1f sys/arch/mips/alchemy/dev/aupcmcia.c
--- a/sys/arch/mips/alchemy/dev/aupcmcia.c      Tue Jan 03 23:15:11 2012 +0000
+++ b/sys/arch/mips/alchemy/dev/aupcmcia.c      Wed Jan 04 02:36:26 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: aupcmcia.c,v 1.8 2012/01/03 07:36:02 kiyohara Exp $ */
+/* $NetBSD: aupcmcia.c,v 1.9 2012/01/04 02:36:26 kiyohara Exp $ */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -35,7 +35,7 @@
 /* #include "pci.h" */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aupcmcia.c,v 1.8 2012/01/03 07:36:02 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aupcmcia.c,v 1.9 2012/01/04 02:36:26 kiyohara Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -389,14 +389,14 @@
                        if (sc->sc_slot_status(sp->as_slot) != 0) {
                                if (!sp->as_status) {
                                        DPRINTF(("%s: card %d insertion\n",
-                                                   sc->sc_dev.dv_xname, i));
+                                           device_xname(sc->sc_dev), i));
                                        attach |= (1 << i);
                                        sp->as_status = 1;
                                }
                        } else {
                                if (sp->as_status) {
                                        DPRINTF(("%s: card %d removal\n",
-                                                   sc->sc_dev.dv_xname, i));
+                                           device_xname(sc->sc_dev), i));
                                        detach |= (1 << i);
                                        sp->as_status = 0;
                                }
@@ -409,8 +409,7 @@
 
                        if (detach & (1 << i)) {
                                aupcm_slot_disable(sp);
-                               pcmcia_card_detach(sp->as_pcmcia,
-                                   DETACH_FORCE);
+                               pcmcia_card_detach(sp->as_pcmcia, DETACH_FORCE);
                        } else if (attach & (1 << i)) {
                                /*
                                 * until the function is enabled, don't
diff -r b66c05d23b5b -r 965295cb6f1f sys/arch/mips/alchemy/dev/auspi.c
--- a/sys/arch/mips/alchemy/dev/auspi.c Tue Jan 03 23:15:11 2012 +0000
+++ b/sys/arch/mips/alchemy/dev/auspi.c Wed Jan 04 02:36:26 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: auspi.c,v 1.7 2012/01/03 07:36:02 kiyohara Exp $ */
+/* $NetBSD: auspi.c,v 1.8 2012/01/04 02:36:26 kiyohara Exp $ */
 
 /*-
  * Copyright (c) 2006 Urbana-Champaign Independent Media Center.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: auspi.c,v 1.7 2012/01/03 07:36:02 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: auspi.c,v 1.8 2012/01/04 02:36:26 kiyohara Exp $");
 
 #include "locators.h"
 
@@ -162,7 +162,7 @@
        sc->sc_ih = au_intr_establish(aa->aupsc_irq, 0, IPL_BIO, IST_LEVEL,
            auspi_intr, sc);
 
-       (void) config_found_ia(&sc->sc_dev, "spibus", &sba, spibus_print);
+       (void) config_found_ia(self, "spibus", &sba, spibus_print);
 }
 
 int
@@ -376,15 +376,15 @@
 
        if (ev & SPIMSK_MM) {
                printf("%s: multiple masters detected!\n",
-                   sc->sc_dev.dv_xname);
+                   device_xname(sc->sc_dev));
                err = EIO;
        }
        if (ev & SPIMSK_RO) {
-               printf("%s: receive overflow\n", sc->sc_dev.dv_xname);
+               printf("%s: receive overflow\n", device_xname(sc->sc_dev));
                err = EIO;
        }
        if (ev & SPIMSK_TU) {
-               printf("%s: transmit underflow\n", sc->sc_dev.dv_xname);
+               printf("%s: transmit underflow\n", device_xname(sc->sc_dev));
                err = EIO;
        }
        if (err) {
@@ -409,7 +409,7 @@
                        if ((sc->sc_wchunk != NULL) ||
                            (sc->sc_rchunk != NULL)) {
                                printf("%s: partial transfer?\n",
-                                   sc->sc_dev.dv_xname);
+                                   device_xname(sc->sc_dev));
                                err = EIO;
                        } 
                        auspi_done(sc, err);



Home | Main Index | Thread Index | Old Index