diff options
| author | Sam Leffler <sam@FreeBSD.org> | 2003-09-05 22:51:18 +0000 |
|---|---|---|
| committer | Sam Leffler <sam@FreeBSD.org> | 2003-09-05 22:51:18 +0000 |
| commit | 7c00e355a2269fcb91353ba871b8abc597402edb (patch) | |
| tree | 7ceff8cf3739cce99373b6e6dfd5998aaccd3679 | |
| parent | 8d8d970db15335bb9fb7f39db24d5ed150fa8df3 (diff) | |
Notes
| -rw-r--r-- | sys/kern/subr_bus.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index daabd8dcf8a4..e5f9a98d0c22 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -2055,10 +2055,20 @@ int bus_setup_intr(device_t dev, struct resource *r, int flags, driver_intr_t handler, void *arg, void **cookiep) { - if (dev->parent == 0) - return (EINVAL); - return (BUS_SETUP_INTR(dev->parent, dev, r, flags, - handler, arg, cookiep)); + int error; + + if (dev->parent != 0) { + error = BUS_SETUP_INTR(dev->parent, dev, r, flags, + handler, arg, cookiep); + if (error == 0) { + if (flags & INTR_MPSAFE) + device_printf(dev, "[MPSAFE]\n"); + if (flags & INTR_FAST) + device_printf(dev, "[FAST]\n"); + } + } else + error = EINVAL; + return (error); } int |
