I submitted the patch originally. Otherwise it would release the resource
that wasn't held for the port I don't have.
I think the problem is that when deciding if to release the port, it
considers the _new_ setting of the state->type. Thus, when you change
the uart to "none", the previous allocation is not released.
I think the following (untested) patch should remedy this. My brain
is having trouble thinking around this, but the check for releasing the
region uses the same values used for requesting the region.
--- serial.c~ Fri Oct 15 19:26:57 1999
+++ serial.c Fri Oct 15 19:36:56 1999
@@ -1997,7 +1997,6 @@
info->flags = ((state->flags & ~ASYNC_INTERNAL_FLAGS) |
(info->flags & ASYNC_INTERNAL_FLAGS));
state->custom_divisor = new_serial.custom_divisor;
- state->type = new_serial.type;
state->close_delay = new_serial.close_delay * HZ/100;
state->closing_wait = new_serial.closing_wait * HZ/100;
#if (LINUX_VERSION_CODE > 0x200100)
@@ -2018,6 +2017,7 @@
info->port = state->port = new_serial.port;
info->hub6 = state->hub6 = new_serial.hub6;
}
+ state->type = new_serial.type;
if ((state->type != PORT_UNKNOWN) && state->port)
request_region(state->port,8,"serial(set)");
-- `O O' | Nick.Holloway@alfie.demon.co.uk // ^ \\ | http://www.alfie.demon.co.uk/- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/