summaryrefslogtreecommitdiffstats
path: root/sys/mips/nlm
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2013-10-29 20:38:58 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2013-10-29 20:38:58 +0000
commit6dbec20d9c93ee6ad5183ae5cba3f6a788fe958f (patch)
treefab1c681af0bee66dffb3ecd5be72f7c5f2bce2a /sys/mips/nlm
parent5a4826ef19c8f1540b66b292ab6470524d22d2dc (diff)
downloadFreeBSD-src-6dbec20d9c93ee6ad5183ae5cba3f6a788fe958f.zip
FreeBSD-src-6dbec20d9c93ee6ad5183ae5cba3f6a788fe958f.tar.gz
Panics about how things can't be attached should probably happen in the
attach method rather than probe. Submitted by: brooks
Diffstat (limited to 'sys/mips/nlm')
-rw-r--r--sys/mips/nlm/tick.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/mips/nlm/tick.c b/sys/mips/nlm/tick.c
index 47c6b34..75bedfb 100644
--- a/sys/mips/nlm/tick.c
+++ b/sys/mips/nlm/tick.c
@@ -314,9 +314,6 @@ static int
clock_probe(device_t dev)
{
- if (device_get_unit(dev) != 0)
- panic("can't attach more clocks");
-
device_set_desc(dev, "Generic MIPS32 ticker");
return (BUS_PROBE_NOWILDCARD);
}
@@ -333,6 +330,9 @@ clock_attach(device_t dev)
{
struct clock_softc *sc;
+ if (device_get_unit(dev) != 0)
+ panic("can't attach more clocks");
+
softc = sc = device_get_softc(dev);
cpu_establish_hardintr("compare", clock_intr, NULL,
sc, IRQ_TIMER, INTR_TYPE_CLK, &sc->intr_handler);
OpenPOWER on IntegriCloud