Give ohci_intr a proper return value. In FreeBSD, this is void. Remove

now-redundant cast on establishing the interrupt.
This commit is contained in:
Warner Losh 2006-02-11 03:29:02 +00:00
parent da8341a31a
commit 5df2beab5b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=155523
3 changed files with 7 additions and 7 deletions

View File

@ -1145,23 +1145,23 @@ ohci_dumpregs(ohci_softc_t *sc)
Static int ohci_intr1(ohci_softc_t *);
int
void
ohci_intr(void *p)
{
ohci_softc_t *sc = p;
if (sc == NULL || sc->sc_dying)
return (0);
return;
/* If we get an interrupt while polling, then just ignore it. */
if (sc->sc_bus.use_polling) {
#ifdef DIAGNOSTIC
printf("ohci_intr: ignored interrupt while polling\n");
#endif
return (0);
return;
}
return (ohci_intr1(sc));
ohci_intr1(sc);
}
Static int

View File

@ -295,8 +295,8 @@ ohci_pci_attach(device_t self)
sprintf(sc->sc_vendor, "(0x%04x)", pci_get_vendor(self));
}
err = bus_setup_intr(self, sc->irq_res, INTR_TYPE_BIO,
(driver_intr_t *) ohci_intr, sc, &sc->ih);
err = bus_setup_intr(self, sc->irq_res, INTR_TYPE_BIO, ohci_intr, sc,
&sc->ih);
if (err) {
device_printf(self, "Could not setup irq, %d\n", err);
sc->ih = NULL;

View File

@ -164,7 +164,7 @@ struct ohci_xfer {
#define OXFER(xfer) ((struct ohci_xfer *)(xfer))
usbd_status ohci_init(ohci_softc_t *);
int ohci_intr(void *);
void ohci_intr(void *);
int ohci_detach(ohci_softc_t *, int);
#if defined(__NetBSD__) || defined(__OpenBSD__)
int ohci_activate(device_ptr_t, enum devact);