<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">Received: from mnm [127.0.0.1]
	by localhost with POP3 (fetchmail-5.9.0)
	for akpm@localhost (single-drop); Wed, 17 Sep 2003 09:45:13 -0700 (PDT)
Received: by mangalore (mbox akpm)
 (with Cubic Circle's cucipop (v1.31 1998/05/13) Thu Sep 18 02:44:23 2003)
X-From_: linux-kernel-owner+akpm=40zip.com.au@vger.kernel.org  Thu Sep 18 02:39:08 2003
Return-Path: &lt;linux-kernel-owner+akpm=40zip.com.au@vger.kernel.org&gt;
Received: from vger.kernel.org (vger.kernel.org [67.72.78.212])
	by mangalore.zipworld.com.au (8.12.3/8.12.3/Debian-6.4) with ESMTP id h8HGd5Lx014696
	for &lt;akpm@zip.com.au&gt;; Thu, 18 Sep 2003 02:39:07 +1000
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
	id S262034AbTIQQgb (ORCPT &lt;rfc822;akpm@zip.com.au&gt;);
	Wed, 17 Sep 2003 12:36:31 -0400
Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262181AbTIQQgb
	(ORCPT &lt;rfc822;linux-kernel-outgoing&gt;);
	Wed, 17 Sep 2003 12:36:31 -0400
Received: from vena.lwn.net ([206.168.112.25]:54501 "HELO lwn.net")
	by vger.kernel.org with SMTP id S262034AbTIQQg3 (ORCPT
	&lt;rfc822;linux-kernel@vger.kernel.org&gt;);
	Wed, 17 Sep 2003 12:36:29 -0400
Received: (qmail 19835 invoked by alias); 17 Sep 2003 16:36:28 -0000
Message-ID: &lt;20030917163628.19833.qmail@lwn.net&gt;
To: linux-kernel@vger.kernel.org
Cc: torvalds@osdl.org
Subject: Re: [PATCH] Export new char dev functions 
From: corbet@lwn.net (Jonathan Corbet)
In-reply-to: Your message of "Wed, 17 Sep 2003 03:49:11 BST."
             &lt;20030917024911.GA35464@compsoc.man.ac.uk&gt; 
Date: Wed, 17 Sep 2003 10:36:28 -0600
Sender: linux-kernel-owner@vger.kernel.org
Precedence: bulk
X-Mailing-List: linux-kernel@vger.kernel.org
X-Spam-Status: No, hits=-10.1 required=6.0
	tests=BAYES_01,IN_REP_TO,PATCH_UNIFIED_DIFF,X_MAILING_LIST
	autolearn=ham version=2.53
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.53 (1.174.2.15-2003-03-30-exp)

&gt; John Levon sez:
&gt; &gt; Of course, there are other exports from that file (i.e. register_chrdev());
&gt; &gt; are we actively trying to shrink ksyms.c?
&gt; 
&gt; I think we are, yes. ksyms.c just makes life harder.

OK, here is a version that evacutates all of fs/char_dev.c's functions out
of ksyms.c.  And that, probably, is about all the bandwidth this little
patch is worth...

jon

diff -urN -X dontdiff test5-vanilla/fs/char_dev.c test5/fs/char_dev.c
--- test5-vanilla/fs/char_dev.c	Mon Sep  8 13:50:01 2003
+++ test5/fs/char_dev.c	Wed Sep 17 10:45:46 2003
@@ -445,3 +445,18 @@
 	kset_register(&amp;kset_dynamic);
 	cdev_map = kobj_map_init(base_probe, &amp;cdev_subsys);
 }
+
+
+/* Let modules do char dev stuff */
+EXPORT_SYMBOL(register_chrdev_region);
+EXPORT_SYMBOL(unregister_chrdev_region);
+EXPORT_SYMBOL(alloc_chrdev_region);
+EXPORT_SYMBOL(cdev_init);
+EXPORT_SYMBOL(cdev_alloc);
+EXPORT_SYMBOL(cdev_get);
+EXPORT_SYMBOL(cdev_put);
+EXPORT_SYMBOL(cdev_del);
+EXPORT_SYMBOL(cdev_add);
+EXPORT_SYMBOL(cdev_unmap);
+EXPORT_SYMBOL(register_chrdev);
+EXPORT_SYMBOL(unregister_chrdev);

diff -urN -X dontdiff test5-vanilla/kernel/ksyms.c test5/kernel/ksyms.c
--- test5-vanilla/kernel/ksyms.c	Wed Sep 17 01:58:05 2003
+++ test5/kernel/ksyms.c	Wed Sep 17 10:45:46 2003
@@ -348,8 +348,6 @@
 EXPORT_SYMBOL(unlock_page);
 
 /* device registration */
-EXPORT_SYMBOL(register_chrdev);
-EXPORT_SYMBOL(unregister_chrdev);
 EXPORT_SYMBOL(register_blkdev);
 EXPORT_SYMBOL(unregister_blkdev);
 EXPORT_SYMBOL(tty_register_driver);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

</pre></body></html>