[2.6 patch] ISDN_CAPI_CAPIFS related cleanups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch contains the following cleanups:
- move the help text to the right option
- replace some #ifdef's in capi.c with dummy functions in capifs.h
- use CONFIG_ISDN_CAPI_CAPIFS_BOOL in one place in capi.c


Signed-off-by: Adrian Bunk <[email protected]>

---

 drivers/isdn/capi/Kconfig  |   10 +++++-----
 drivers/isdn/capi/capi.c   |    9 ++-------
 drivers/isdn/capi/capifs.h |    9 +++++++++
 3 files changed, 16 insertions(+), 12 deletions(-)

--- linux-2.6.16-rc1-mm4-full/drivers/isdn/capi/Kconfig.old	2006-01-31 20:36:44.000000000 +0100
+++ linux-2.6.16-rc1-mm4-full/drivers/isdn/capi/Kconfig	2006-01-31 20:38:10.000000000 +0100
@@ -31,17 +31,17 @@
 config ISDN_CAPI_CAPIFS_BOOL
 	bool "CAPI2.0 filesystem support"
 	depends on ISDN_CAPI_MIDDLEWARE && ISDN_CAPI_CAPI20
-
-config ISDN_CAPI_CAPIFS
-	tristate
-	depends on ISDN_CAPI_CAPIFS_BOOL
-	default ISDN_CAPI_CAPI20
 	help
 	  This option provides a special file system, similar to /dev/pts with
 	  device nodes for the special ttys established by using the
 	  middleware extension above. If you want to use pppd with
 	  pppdcapiplugin to dial up to your ISP, say Y here.
 
+config ISDN_CAPI_CAPIFS
+	tristate
+	depends on ISDN_CAPI_CAPIFS_BOOL
+	default ISDN_CAPI_CAPI20
+
 config ISDN_CAPI_CAPIDRV
 	tristate "CAPI2.0 capidrv interface support"
 	depends on ISDN_CAPI && ISDN_I4L
--- linux-2.6.16-rc1-mm4-full/drivers/isdn/capi/capifs.h.old	2006-01-31 20:40:36.000000000 +0100
+++ linux-2.6.16-rc1-mm4-full/drivers/isdn/capi/capifs.h	2006-01-31 20:41:44.000000000 +0100
@@ -7,5 +7,14 @@
  *
  */
 
+#ifdef CONFIG_ISDN_CAPI_CAPIFS_BOOL
+
 void capifs_new_ncci(unsigned int num, dev_t device);
 void capifs_free_ncci(unsigned int num);
+
+#else  /*  CONFIG_ISDN_CAPI_CAPIFS_BOOL  */
+
+static inline void capifs_new_ncci(unsigned int num, dev_t device) {}
+static inline void capifs_free_ncci(unsigned int num) {}
+
+#endif  /*  CONFIG_ISDN_CAPI_CAPIFS_BOOL  */
--- linux-2.6.16-rc1-mm4-full/drivers/isdn/capi/capi.c.old	2006-01-31 20:38:53.000000000 +0100
+++ linux-2.6.16-rc1-mm4-full/drivers/isdn/capi/capi.c	2006-01-31 20:40:24.000000000 +0100
@@ -42,9 +42,8 @@
 #include <linux/devfs_fs_kernel.h>
 #include <linux/isdn/capiutil.h>
 #include <linux/isdn/capicmd.h>
-#if defined(CONFIG_ISDN_CAPI_CAPIFS) || defined(CONFIG_ISDN_CAPI_CAPIFS_MODULE)
+
 #include "capifs.h"
-#endif
 
 static char *revision = "$Revision: 1.1.2.7 $";
 
@@ -311,9 +310,7 @@
 #ifdef _DEBUG_REFCOUNT
 		printk(KERN_DEBUG "set mp->nccip\n");
 #endif
-#if defined(CONFIG_ISDN_CAPI_CAPIFS) || defined(CONFIG_ISDN_CAPI_CAPIFS_MODULE)
 		capifs_new_ncci(mp->minor, MKDEV(capi_ttymajor, mp->minor));
-#endif
 	}
 #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */
 	for (pp=&cdev->nccis; *pp; pp = &(*pp)->next)
@@ -336,9 +333,7 @@
 			*pp = (*pp)->next;
 #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
 			if ((mp = np->minorp) != 0) {
-#if defined(CONFIG_ISDN_CAPI_CAPIFS) || defined(CONFIG_ISDN_CAPI_CAPIFS_MODULE)
 				capifs_free_ncci(mp->minor);
-#endif
 				if (mp->tty) {
 					mp->nccip = NULL;
 #ifdef _DEBUG_REFCOUNT
@@ -1520,7 +1515,7 @@
 	proc_init();
 
 #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
-#if defined(CONFIG_ISDN_CAPI_CAPIFS) || defined(CONFIG_ISDN_CAPI_CAPIFS_MODULE)
+#ifdef CONFIG_ISDN_CAPI_CAPIFS_BOOL
         compileinfo = " (middleware+capifs)";
 #else
         compileinfo = " (no capifs)";

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux