Module Name: src
Committed By: tsutsui
Date: Sat Sep 5 12:59:24 UTC 2009
Modified Files:
src/sys/dev/pci: ahd_pci.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/pci/ahd_pci.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/dev/pci/ahd_pci.c
diff -u src/sys/dev/pci/ahd_pci.c:1.29 src/sys/dev/pci/ahd_pci.c:1.30
--- src/sys/dev/pci/ahd_pci.c:1.29 Sat Sep 5 12:55:05 2009
+++ src/sys/dev/pci/ahd_pci.c Sat Sep 5 12:59:24 2009
@@ -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;
}
/*