patch-2.4.3 linux/drivers/isdn/eicon/linchr.c
Next file: linux/drivers/isdn/eicon/linio.c
Previous file: linux/drivers/isdn/eicon/lincfg.c
Back to the patch index
Back to the overall index
- Lines: 58
- Date:
Fri Mar 2 11:12:08 2001
- Orig file:
v2.4.2/linux/drivers/isdn/eicon/linchr.c
- Orig date:
Wed Feb 21 18:20:23 2001
diff -u --recursive --new-file v2.4.2/linux/drivers/isdn/eicon/linchr.c linux/drivers/isdn/eicon/linchr.c
@@ -3,9 +3,6 @@
*
* Copyright (C) Eicon Technology Corporation, 2000.
*
- * This source file is supplied for the exclusive use with Eicon
- * Technology Corporation's range of DIVA Server Adapters.
- *
* Eicon File Revision : 1.12
*
* This program is free software; you can redistribute it and/or modify
@@ -24,6 +21,8 @@
*
*/
+#define __NO_VERSION__
+#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/poll.h>
@@ -240,14 +239,12 @@
return 0;
}
-int private_usage_count;
-extern void mod_inc_use_count(void);
-extern void mod_dec_use_count(void);
+static int private_usage_count;
int do_open(struct inode *pInode, struct file *pFile)
{
-#if defined(MODULE)
- mod_inc_use_count();
+ MOD_INC_USE_COUNT;
+#ifdef MODULE
private_usage_count++;
#endif
return 0;
@@ -255,8 +252,8 @@
int do_release(struct inode *pInode, struct file *pFile)
{
-#if defined(MODULE)
- mod_dec_use_count();
+ MOD_DEC_USE_COUNT;
+#ifdef MODULE
private_usage_count--;
#endif
return 0;
@@ -267,8 +264,6 @@
while (private_usage_count > 0)
{
private_usage_count--;
-#if defined(MODULE)
- mod_dec_use_count();
-#endif
+ MOD_DEC_USE_COUNT;
}
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)