diff options
author | jhb <jhb@FreeBSD.org> | 2012-10-15 16:13:55 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2012-10-15 16:13:55 +0000 |
commit | b7ae8b66cecbc88664583fc7dc1b0a15a416f161 (patch) | |
tree | d6f695a540d17d7e2aa9c7ca78689c9af531e604 /sys/dev/buslogic/bt_eisa.c | |
parent | fcf1c6db5250deb9191312a95f978e557d091b14 (diff) | |
download | FreeBSD-src-b7ae8b66cecbc88664583fc7dc1b0a15a416f161.zip FreeBSD-src-b7ae8b66cecbc88664583fc7dc1b0a15a416f161.tar.gz |
Add locking to the bt(4) driver and mark it MPSAFE.
- Use device_printf() and device_get_unit() instead of storing the unit
number in the softc.
- Remove use of explicit bus space handles and tags.
- Return an errno value from bt_eisa_attach() if an error occurs rather
than -1.
- Use BUS_PROBE_DEFAULT rather than 0.
Tested by: no one
Diffstat (limited to 'sys/dev/buslogic/bt_eisa.c')
-rw-r--r-- | sys/dev/buslogic/bt_eisa.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/buslogic/bt_eisa.c b/sys/dev/buslogic/bt_eisa.c index 85a13ac..6a61d7a 100644 --- a/sys/dev/buslogic/bt_eisa.c +++ b/sys/dev/buslogic/bt_eisa.c @@ -140,7 +140,7 @@ bt_eisa_alloc_resources(device_t dev) return (ENOMEM); } } else - irq = 0; + irq = NULL; bt->irq = irq; return (0); @@ -287,7 +287,7 @@ bt_eisa_probe(device_t dev) result = ENXIO; } else { eisa_add_intr(dev, info.irq, shared); - result = 0; + result = BUS_PROBE_DEFAULT; } bt_eisa_release_resources(dev); @@ -315,11 +315,11 @@ bt_eisa_attach(device_t dev) /* nsegments */ ~0, /* maxsegsz */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ 0, - /* lockfunc */ busdma_lock_mutex, - /* lockarg, */ &Giant, + /* lockfunc */ NULL, + /* lockarg, */ NULL, &bt->parent_dmat) != 0) { bt_eisa_release_resources(dev); - return -1; + return (ENOMEM); } /* @@ -328,7 +328,7 @@ bt_eisa_attach(device_t dev) */ if (bt_probe(dev) || bt_fetch_adapter_info(dev) || bt_init(dev)) { bt_eisa_release_resources(dev); - return -1; + return (ENXIO); } /* Attach sub-devices - always succeeds (sets up intr) */ |