Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Use device_t self arg to get a device name rathe...



details:   https://anonhg.NetBSD.org/src/rev/20c34dfa213d
branches:  trunk
changeset: 747202:20c34dfa213d
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sat Sep 05 12:59:24 2009 +0000

description:
Use device_t self arg to get a device name rather than through &ahd->sc_dev
which needs to be changed on future device_t/softc split.

diffstat:

 sys/dev/pci/ahd_pci.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r 8810307b0d48 -r 20c34dfa213d sys/dev/pci/ahd_pci.c
--- a/sys/dev/pci/ahd_pci.c     Sat Sep 05 12:55:05 2009 +0000
+++ b/sys/dev/pci/ahd_pci.c     Sat Sep 05 12:59:24 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ahd_pci.c,v 1.29 2009/09/05 12:55:05 tsutsui Exp $     */
+/*     $NetBSD: ahd_pci.c,v 1.30 2009/09/05 12:59:24 tsutsui Exp $     */
 
 /*
  * Product specific probe and attach routines for:
@@ -50,7 +50,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ahd_pci.c,v 1.29 2009/09/05 12:55:05 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahd_pci.c,v 1.30 2009/09/05 12:59:24 tsutsui Exp $");
 
 #define AHD_PCI_IOADDR PCI_MAPREG_START        /* I/O Address */
 #define AHD_PCI_MEMADDR        (PCI_MAPREG_START + 4)  /* Mem I/O Address */
@@ -318,7 +318,7 @@
        const char              *intrstr;
        struct ahd_pci_busdata  *bd;
 
-       ahd_set_name(ahd, device_xname(&ahd->sc_dev));
+       ahd_set_name(ahd, device_xname(self));
        ahd->parent_dmat = pa->pa_dmat;
 
        command = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
@@ -396,7 +396,7 @@
        if (!pci_get_capability(pa->pa_pc, pa->pa_tag, PCI_CAP_PCIX,
            &bd->pcix_off, NULL)) {
                if (ahd->chip & AHD_PCIX)
-                       aprint_error_dev(&ahd->sc_dev,
+                       aprint_error_dev(self,
                            "warning: can't find PCI-X capability\n");
                ahd->chip &= ~AHD_PCIX;
                ahd->chip |= AHD_PCI;
@@ -484,7 +484,7 @@
        /* power up chip */
        if ((error = pci_activate(pa->pa_pc, pa->pa_tag, self,
            pci_activate_null)) && error != EOPNOTSUPP) {
-               aprint_error_dev(&ahd->sc_dev, "cannot activate %d\n", error);
+               aprint_error_dev(self, "cannot activate %d\n", error);
                return;
        }
        /*



Home | Main Index | Thread Index | Old Index