From 213f5c9616423132ea5558a2b746c1d7cc6771e2 Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Thu, 21 Feb 2008 11:42:24 +0000 Subject: There's no need to print the IRQ now that we have direct configuration. Cleanup the interrupt establishment code a little whilst we're here. ok miod@ jasper@ --- sys/arch/sgi/dev/power.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) (limited to 'sys/arch') diff --git a/sys/arch/sgi/dev/power.c b/sys/arch/sgi/dev/power.c index b2bc3954800..ee8b4060f66 100644 --- a/sys/arch/sgi/dev/power.c +++ b/sys/arch/sgi/dev/power.c @@ -1,4 +1,4 @@ -/* $OpenBSD: power.c,v 1.5 2008/02/20 18:46:20 miod Exp $ */ +/* $OpenBSD: power.c,v 1.6 2008/02/21 11:42:23 jsing Exp $ */ /* * Copyright (c) 2007 Jasper Lievisse Adriaanse @@ -37,7 +37,7 @@ #include /* - * Power button driver for the SGI O2 + * Power button driver for the SGI O2. */ struct power_softc { @@ -72,35 +72,29 @@ power_attach(struct device *parent, struct device *self, void *aux) { struct power_softc *sc = (void *)self; struct confargs *ca = aux; - int sc_irq; extern bus_space_handle_t clock_h; extern bus_space_handle_t mace_h; - void *rv = NULL; sc->sc_st = ca->ca_iot; - sc_irq = ca->ca_intr; - - printf(": "); /* Map subregion to clock address space. */ if (bus_space_subregion(sc->sc_st, clock_h, 0, 0x50, &sc->sc_sh)) { - printf("failed to map clock address space!\n"); + printf(": failed to map clock address space!\n"); return; } /* Map subregion to ISA control registers. */ if (bus_space_subregion(sc->sc_st, mace_h, 0, 0x80, &sc->sc_isash)) { - printf("failed to map ISA control registers!\n"); + printf(": failed to map ISA control registers!\n"); return; } - /* Establish the interrupt. */ - rv = macebus_intr_establish(NULL, sc_irq, IST_EDGE, IPL_TTY, power_intr, - sc, sc->sc_dev.dv_xname); - if (rv == NULL) - printf("unable to establish interrupt\n"); + /* Establish interrupt handler. */ + if (macebus_intr_establish(NULL, ca->ca_intr, IST_EDGE, IPL_TTY, + power_intr, sc, sc->sc_dev.dv_xname)) + printf("\n"); else - printf("using irq %d\n", sc_irq); + printf(": unable to establish interrupt!\n"); } int -- cgit v1.2.3