From 43dea4dc6595d70f251060d045ec1cfa762b5121 Mon Sep 17 00:00:00 2001 From: peter Date: Sat, 8 May 1999 18:15:49 +0000 Subject: [PATCH] Look up the sensitive flag better, allowing interoperation between old and new isa drivers with sensitive flags. If the resource_find() code is meant to "find" the wildcard sensitive flag for a driver even though a unit is supplied, this can be simplified. --- sys/amd64/isa/isa.c | 6 ++++-- sys/i386/isa/isa.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sys/amd64/isa/isa.c b/sys/amd64/isa/isa.c index 3547800cd19b..caa6fc967ff8 100644 --- a/sys/amd64/isa/isa.c +++ b/sys/amd64/isa/isa.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: isa.c,v 1.121 1999/04/24 06:47:24 peter Exp $ + * $Id: isa.c,v 1.122 1999/04/24 18:24:43 kato Exp $ */ /* @@ -100,8 +100,10 @@ isa_add_device(device_t dev, const char *name, int unit) int sensitive, t; static device_t last_sensitive; + /* device-specific flag overrides any wildcard */ + sensitive = 0; if (resource_int_value(name, unit, "sensitive", &sensitive) != 0) - sensitive = 0; + resource_int_value(name, -1, "sensitive", &sensitive); idev = malloc(sizeof(struct isa_device), M_ISADEV, M_NOWAIT); if (!idev) diff --git a/sys/i386/isa/isa.c b/sys/i386/isa/isa.c index 3547800cd19b..caa6fc967ff8 100644 --- a/sys/i386/isa/isa.c +++ b/sys/i386/isa/isa.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: isa.c,v 1.121 1999/04/24 06:47:24 peter Exp $ + * $Id: isa.c,v 1.122 1999/04/24 18:24:43 kato Exp $ */ /* @@ -100,8 +100,10 @@ isa_add_device(device_t dev, const char *name, int unit) int sensitive, t; static device_t last_sensitive; + /* device-specific flag overrides any wildcard */ + sensitive = 0; if (resource_int_value(name, unit, "sensitive", &sensitive) != 0) - sensitive = 0; + resource_int_value(name, -1, "sensitive", &sensitive); idev = malloc(sizeof(struct isa_device), M_ISADEV, M_NOWAIT); if (!idev)