summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-06-21 22:25:18 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-06-21 22:25:18 +0000
commit6aa28c5f48a5999e15e3d510c19e367409991faf (patch)
tree10e9eff3f2b76f561bb17b36efb104ea3b2c9084 /sys/dev
parent4e51e54b337c7ba899df8555a996789e7d85dcae (diff)
Pick the sbus clock frequency from the attach args instead of peeking at the
parent softc.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/sbus/esp_sbus.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/sbus/esp_sbus.c b/sys/dev/sbus/esp_sbus.c
index 1036fc1566a..0df2b954022 100644
--- a/sys/dev/sbus/esp_sbus.c
+++ b/sys/dev/sbus/esp_sbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: esp_sbus.c,v 1.18 2006/06/02 20:00:56 miod Exp $ */
+/* $OpenBSD: esp_sbus.c,v 1.19 2006/06/21 22:25:17 miod Exp $ */
/* $NetBSD: esp_sbus.c,v 1.14 2001/04/25 17:53:37 bouyer Exp $ */
/*-
@@ -178,8 +178,7 @@ espattach_sbus(struct device *parent, struct device *self, void *aux)
sc->sc_id = getpropint(sa->sa_node, "initiator-id", 7);
sc->sc_freq = getpropint(sa->sa_node, "clock-frequency", -1);
if (sc->sc_freq < 0)
- sc->sc_freq = ((struct sbus_softc *)
- sc->sc_dev.dv_parent)->sc_clockfreq;
+ sc->sc_freq = sa->sa_frequency;
#ifdef ESP_SBUS_DEBUG
printf("%s: espattach_sbus: sc_id %d, freq %d\n",