Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64/dev Use device_lookup() to locate device in...
details: https://anonhg.NetBSD.org/src/rev/8248b44fb75c
branches: trunk
changeset: 802011:8248b44fb75c
user: palle <palle%NetBSD.org@localhost>
date: Wed Aug 27 19:02:17 2014 +0000
description:
Use device_lookup() to locate device instances
diffstat:
sys/arch/sparc64/dev/ebus_mainbus.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (45 lines):
diff -r 43215a144361 -r 8248b44fb75c sys/arch/sparc64/dev/ebus_mainbus.c
--- a/sys/arch/sparc64/dev/ebus_mainbus.c Wed Aug 27 16:41:50 2014 +0000
+++ b/sys/arch/sparc64/dev/ebus_mainbus.c Wed Aug 27 19:02:17 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ebus_mainbus.c,v 1.13 2014/08/24 19:06:14 palle Exp $ */
+/* $NetBSD: ebus_mainbus.c,v 1.14 2014/08/27 19:02:17 palle Exp $ */
/* $OpenBSD: ebus_mainbus.c,v 1.7 2010/11/11 17:58:23 miod Exp $ */
/*
@@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ebus_mainbus.c,v 1.13 2014/08/24 19:06:14 palle Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ebus_mainbus.c,v 1.14 2014/08/27 19:02:17 palle Exp $");
#ifdef DEBUG
#define EDB_PROM 0x01
@@ -56,7 +56,7 @@
#include <dev/ebus/ebusvar.h>
#include <sparc64/dev/ebusvar.h>
-extern struct cfdriver pyro_cd;
+#include "ioconf.h"
int ebus_mainbus_match(device_t, cfdata_t, void *);
void ebus_mainbus_attach(device_t, device_t, void *);
@@ -146,7 +146,7 @@
*/
for (i = 0; i < sc->sc_nintmap; i++) {
for (j = 0; j < pyro_cd.cd_ndevs; j++) {
- device_t dt = pyro_cd.cd_devs[j];
+ device_t dt = device_lookup(&pyro_cd, j);
psc = device_private(dt);
if (psc && psc->sc_node == sc->sc_intmap[i].cnode) {
sc->sc_intmap[i].cintr |= psc->sc_ign;
@@ -337,7 +337,7 @@
int i;
for (i = 0; i < pyro_cd.cd_ndevs; i++) {
- device_t dt = pyro_cd.cd_devs[i];
+ device_t dt = device_lookup(&pyro_cd, i);
psc = device_private(dt);
if (psc && psc->sc_ign == INTIGN(ihandle)) {
break;
Home |
Main Index |
Thread Index |
Old Index