[dahdi-commits] sruffell: linux/trunk r9777 - /linux/trunk/drivers/dahdi/
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Mon Feb 28 08:19:13 CST 2011
Author: sruffell
Date: Mon Feb 28 08:19:09 2011
New Revision: 9777
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9777
Log:
dahdi: Do not rebuild dahdi-base.c when only updating the version.
This moves the version string into dahdi-version.c that is then linked into
dahdi-base.c and dahdi-sysfs.c. This speeds builds on slow computers since
dahdi-base.c and dahdi-sysfs.c does not need to be rebuilt if only the version
string is changing.
Signed-off-by: Shaun Ruffell <sruffell at digium.com>
Acked-by: Oron Peled <oron.peled at xorcom.com>
Added:
linux/trunk/drivers/dahdi/dahdi-version.c (with props)
Modified:
linux/trunk/drivers/dahdi/Kbuild
linux/trunk/drivers/dahdi/dahdi-base.c
linux/trunk/drivers/dahdi/dahdi-sysfs.c
linux/trunk/drivers/dahdi/dahdi.h
Modified: linux/trunk/drivers/dahdi/Kbuild
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/Kbuild?view=diff&rev=9777&r1=9776&r2=9777
==============================================================================
--- linux/trunk/drivers/dahdi/Kbuild (original)
+++ linux/trunk/drivers/dahdi/Kbuild Mon Feb 28 08:19:09 2011
@@ -76,7 +76,7 @@
endif
endif
-dahdi-objs := dahdi-base.o dahdi-sysfs.o
+dahdi-objs := dahdi-base.o dahdi-sysfs.o dahdi-version.o
###############################################################################
# Find appropriate ARCH value for VPMADT032 and HPEC binary modules
Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=9777&r1=9776&r2=9777
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Mon Feb 28 08:19:09 2011
@@ -62,7 +62,6 @@
#define DAHDI_PRINK_MACROS_USE_debug
#define module_printk(level, fmt, args...) printk(level "%s: " fmt, THIS_MODULE->name, ## args)
-#include <dahdi/version.h>
/* Grab fasthdlc with tables */
#define FAST_HDLC_NEED_TABLES
#include <dahdi/kernel.h>
@@ -4799,7 +4798,7 @@
size_t space = sizeof(vi.echo_canceller) - 1;
memset(&vi, 0, sizeof(vi));
- strlcpy(vi.version, DAHDI_VERSION, sizeof(vi.version));
+ strlcpy(vi.version, dahdi_version, sizeof(vi.version));
spin_lock(&ecfactory_list_lock);
list_for_each_entry(cur, &ecfactory_list, list) {
strncat(vi.echo_canceller + strlen(vi.echo_canceller),
@@ -9148,7 +9147,6 @@
* for that. So make dahdi provide it for now. This alias may be removed
* in the future, and users are encouraged not to rely on it. */
MODULE_ALIAS("dahdi_dummy");
-MODULE_VERSION(DAHDI_VERSION);
module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "Sets debugging verbosity as a bitfield, to see"\
Modified: linux/trunk/drivers/dahdi/dahdi-sysfs.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi-sysfs.c?view=diff&rev=9777&r1=9776&r2=9777
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-sysfs.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-sysfs.c Mon Feb 28 08:19:09 2011
@@ -4,7 +4,6 @@
#include <dahdi/kernel.h>
#include <linux/device.h>
#include <linux/slab.h>
-#include <dahdi/version.h>
#include "dahdi.h"
@@ -182,7 +181,7 @@
}
module_printk(KERN_INFO, "Telephony Interface Registered on major %d\n",
DAHDI_MAJOR);
- module_printk(KERN_INFO, "Version: %s\n", DAHDI_VERSION);
+ module_printk(KERN_INFO, "Version: %s\n", dahdi_version);
dahdi_class = class_create(THIS_MODULE, "dahdi");
if (!dahdi_class) {
Added: linux/trunk/drivers/dahdi/dahdi-version.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi-version.c?view=auto&rev=9777
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-version.c (added)
+++ linux/trunk/drivers/dahdi/dahdi-version.c Mon Feb 28 08:19:09 2011
@@ -1,0 +1,33 @@
+/*
+ * Dahdi Version
+ *
+ * Copyright (C) 2001 Jim Dixon / Zapata Telephony.
+ * Copyright (C) 2011 Digium, Inc.
+ *
+ * All rights reserved.
+ *
+ */
+
+/*
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2 as published by the
+ * Free Software Foundation. See the LICENSE file included with
+ * this program for more details.
+ */
+
+#include <linux/module.h>
+
+#include <dahdi/version.h>
+#include <dahdi/kernel.h>
+
+#include "dahdi.h"
+
+const char *const dahdi_version = DAHDI_VERSION;
+
+MODULE_VERSION(DAHDI_VERSION);
Propchange: linux/trunk/drivers/dahdi/dahdi-version.c
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: linux/trunk/drivers/dahdi/dahdi-version.c
------------------------------------------------------------------------------
svn:keywords = 'Author Date Id Revision'
Propchange: linux/trunk/drivers/dahdi/dahdi-version.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: linux/trunk/drivers/dahdi/dahdi.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi.h?view=diff&rev=9777&r1=9776&r2=9777
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi.h (original)
+++ linux/trunk/drivers/dahdi/dahdi.h Mon Feb 28 08:19:09 2011
@@ -25,6 +25,7 @@
*/
extern int debug;
+extern const char *const dahdi_version;
int dahdi_register_chardev(struct dahdi_chardev *dev);
int dahdi_unregister_chardev(struct dahdi_chardev *dev);
More information about the dahdi-commits
mailing list