Commit 092ae09c authored by Bob Miller's avatar Bob Miller Committed by Kai Germaschewski

ISDN: [TRIVIAL] Remove un-needed MOD___USE_COUNT from divasmain's init fuction.

The module load code adds a reference to the owner field before calling
the modules init function so it isn't necessary for the init function
to do a similar action.

Also fixed the racy check_region()/request_region() calls.
parent 7ec85ce3
......@@ -508,15 +508,11 @@ int
diva_os_register_io_port(int on, unsigned long port, unsigned long length,
const char *name)
{
int ret;
if (on) {
if ((ret = check_region(port, length)) < 0) {
DBG_ERR(("A: I/O: can't register port=%08x, error=%d",
port, ret))
if (!request_region(port, length, name)) {
DBG_ERR(("A: I/O: can't register port=%08x", port))
return (-1);
}
request_region(port, length, name);
} else {
release_region(port, length);
}
......@@ -880,8 +876,6 @@ static int DIVA_INIT_FUNCTION divas_init(void)
char tmprev[50];
int ret = 0;
MOD_INC_USE_COUNT;
printk(KERN_INFO "%s\n", DRIVERNAME);
printk(KERN_INFO "%s: Rel:%s Rev:", DRIVERLNAME, DRIVERRELEASE);
strcpy(tmprev, main_revision);
......@@ -932,7 +926,6 @@ static int DIVA_INIT_FUNCTION divas_init(void)
}
out:
MOD_DEC_USE_COUNT;
return (ret);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment