public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [2.6 patch] ISDN_CAPI_CAPIFS related cleanups
@ 2006-01-31 21:33 Adrian Bunk
  2006-01-31 21:44 ` Marcel Holtmann
  2006-02-01  8:43 ` Armin Schindler
  0 siblings, 2 replies; 14+ messages in thread
From: Adrian Bunk @ 2006-01-31 21:33 UTC (permalink / raw)
  To: kkeil, kai.germaschewski; +Cc: isdn4linux, linux-kernel

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 <bunk@stusta.de>

---

 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)";


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2006-02-18 16:00 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-31 21:33 [2.6 patch] ISDN_CAPI_CAPIFS related cleanups Adrian Bunk
2006-01-31 21:44 ` Marcel Holtmann
2006-02-02 21:40   ` Adrian Bunk
2006-02-02 23:57     ` Marcel Holtmann
2006-02-03  8:45       ` Armin Schindler
2006-02-03  8:53         ` Marcel Holtmann
2006-02-03 10:18           ` Armin Schindler
2006-02-03 19:57             ` Marcel Holtmann
2006-02-12 11:09               ` Carsten Paeth
2006-02-12 11:36                 ` Marcel Holtmann
2006-02-18 15:46                   ` Carsten Paeth
2006-02-01  8:43 ` Armin Schindler
2006-02-01 10:44   ` Adrian Bunk
2006-02-01 11:01     ` Armin Schindler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox