From 95de230835139401f64e8e9d6121bf607700416c Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Mon, 27 Mar 2017 12:42:56 +0300 Subject: [PATCH] xpp: remove independent "Unknown" XPP_VERSION The xpp drivers were originally developed seperately and thus had their own version number. For quite some time they no longer have this version number and report 'Revision: Unknown'. Get rid of this mechanism. Signed-off-by: Tzafrir Cohen --- drivers/dahdi/xpp/Kbuild | 15 ++------------- drivers/dahdi/xpp/card_bri.c | 2 -- drivers/dahdi/xpp/card_echo.c | 2 -- drivers/dahdi/xpp/card_fxo.c | 2 -- drivers/dahdi/xpp/card_fxs.c | 2 -- drivers/dahdi/xpp/card_pri.c | 2 -- drivers/dahdi/xpp/parport_debug.c | 1 - drivers/dahdi/xpp/xdefs.h | 2 -- drivers/dahdi/xpp/xpp_dahdi.c | 4 +--- drivers/dahdi/xpp/xpp_usb.c | 2 -- 10 files changed, 3 insertions(+), 31 deletions(-) diff --git a/drivers/dahdi/xpp/Kbuild b/drivers/dahdi/xpp/Kbuild index 8fa83ea..2965af0 100644 --- a/drivers/dahdi/xpp/Kbuild +++ b/drivers/dahdi/xpp/Kbuild @@ -36,20 +36,9 @@ EXTRA_CFLAGS += -DDEBUG_SYNC_PARPORT obj-m += parport_debug.o endif -# Handle versioning -XPP_VERSION_STR ?= $(shell if [ -r $(obj)/.version ]; then echo "\"`cat $(obj)/.version`\""; else echo '"Unknown"'; fi) +# Just in case it was left from an older version: clean-files += xpp_version.h -$(obj)/card_fxs.o $(obj)/card_fxo.o $(obj)/card_bri.o $(obj)/card_pri.o $(obj)/xpp_usb.o $(obj)/xpp.o: $(obj)/xpp_version.h - -$(obj)/xpp_version.h: FORCE - @echo ' VERSION $@' - $(Q)echo '#define XPP_VERSION $(XPP_VERSION_STR)' > $@.tmp - $(Q)if cmp -s $@.tmp $@ ; then echo; else \ - mv $@.tmp $@ ; \ - fi - $(Q)rm -f $@.tmp - # Validations: # - Syntactic verification of perl scripts # - Handle country table validation for init_card_2_* @@ -69,7 +58,7 @@ FXO_MODES = $(src)/../fxo_modes.h FXO_VERIFY = $(obj)/init_card_2_$(XPP_PROTOCOL_VERSION) -v $(obj)/init_fxo_modes hostprogs-y := print_fxo_modes -always := $(xpp_verified) xpp_version.h +always := $(xpp_verified) print_fxo_modes-objs := print_fxo_modes.o HOSTCFLAGS_print_fxo_modes.o += -include $(FXO_MODES) diff --git a/drivers/dahdi/xpp/card_bri.c b/drivers/dahdi/xpp/card_bri.c index 40578e5..76ff495 100644 --- a/drivers/dahdi/xpp/card_bri.c +++ b/drivers/dahdi/xpp/card_bri.c @@ -1788,7 +1788,6 @@ static int __init card_bri_startup(void) if ((ret = xpd_driver_register(&bri_driver.driver)) < 0) return ret; - INFO("revision %s\n", XPP_VERSION); xproto_register(&PROTO_TABLE(BRI)); return 0; } @@ -1803,7 +1802,6 @@ static void __exit card_bri_cleanup(void) MODULE_DESCRIPTION("XPP BRI Card Driver"); MODULE_AUTHOR("Oron Peled "); MODULE_LICENSE("GPL"); -MODULE_VERSION(XPP_VERSION); MODULE_ALIAS_XPD(XPD_TYPE_BRI); module_init(card_bri_startup); diff --git a/drivers/dahdi/xpp/card_echo.c b/drivers/dahdi/xpp/card_echo.c index 1cf9644..4ddc06b 100644 --- a/drivers/dahdi/xpp/card_echo.c +++ b/drivers/dahdi/xpp/card_echo.c @@ -342,7 +342,6 @@ static int __init card_echo_startup(void) ret = xpd_driver_register(&echo_driver.driver); if (ret < 0) return ret; - INFO("revision %s\n", XPP_VERSION); INFO("FEATURE: WITH Octasic echo canceller\n"); xproto_register(&PROTO_TABLE(ECHO)); return 0; @@ -358,7 +357,6 @@ static void __exit card_echo_cleanup(void) MODULE_DESCRIPTION("XPP ECHO Card Driver"); MODULE_AUTHOR("Oron Peled "); MODULE_LICENSE("GPL"); -MODULE_VERSION(XPP_VERSION); MODULE_ALIAS_XPD(XPD_TYPE_ECHO); module_init(card_echo_startup); diff --git a/drivers/dahdi/xpp/card_fxo.c b/drivers/dahdi/xpp/card_fxo.c index e100b79..b4cdabd 100644 --- a/drivers/dahdi/xpp/card_fxo.c +++ b/drivers/dahdi/xpp/card_fxo.c @@ -1602,7 +1602,6 @@ static int __init card_fxo_startup(void) } if ((ret = xpd_driver_register(&fxo_driver.driver)) < 0) return ret; - INFO("revision %s\n", XPP_VERSION); #ifdef WITH_METERING INFO("FEATURE: WITH METERING Detection\n"); #else @@ -1621,7 +1620,6 @@ static void __exit card_fxo_cleanup(void) MODULE_DESCRIPTION("XPP FXO Card Driver"); MODULE_AUTHOR("Oron Peled "); MODULE_LICENSE("GPL"); -MODULE_VERSION(XPP_VERSION); MODULE_ALIAS_XPD(XPD_TYPE_FXO); module_init(card_fxo_startup); diff --git a/drivers/dahdi/xpp/card_fxs.c b/drivers/dahdi/xpp/card_fxs.c index 0a1d119..31a676d 100644 --- a/drivers/dahdi/xpp/card_fxs.c +++ b/drivers/dahdi/xpp/card_fxs.c @@ -2294,7 +2294,6 @@ static int __init card_fxs_startup(void) if ((ret = xpd_driver_register(&fxs_driver.driver)) < 0) return ret; - INFO("revision %s\n", XPP_VERSION); #ifdef POLL_DIGITAL_INPUTS INFO("FEATURE: with DIGITAL INPUTS support (polled every %d msec)\n", poll_digital_inputs); @@ -2320,7 +2319,6 @@ static void __exit card_fxs_cleanup(void) MODULE_DESCRIPTION("XPP FXS Card Driver"); MODULE_AUTHOR("Oron Peled "); MODULE_LICENSE("GPL"); -MODULE_VERSION(XPP_VERSION); MODULE_ALIAS_XPD(XPD_TYPE_FXS); module_init(card_fxs_startup); diff --git a/drivers/dahdi/xpp/card_pri.c b/drivers/dahdi/xpp/card_pri.c index e8ed410..77dad1b 100644 --- a/drivers/dahdi/xpp/card_pri.c +++ b/drivers/dahdi/xpp/card_pri.c @@ -2745,7 +2745,6 @@ static int __init card_pri_startup(void) if ((ret = xpd_driver_register(&pri_driver.driver)) < 0) return ret; - INFO("revision %s\n", XPP_VERSION); #ifdef DAHDI_AUDIO_NOTIFY INFO("FEATURE: WITH DAHDI_AUDIO_NOTIFY\n"); #else @@ -2765,7 +2764,6 @@ static void __exit card_pri_cleanup(void) MODULE_DESCRIPTION("XPP PRI Card Driver"); MODULE_AUTHOR("Oron Peled "); MODULE_LICENSE("GPL"); -MODULE_VERSION(XPP_VERSION); MODULE_ALIAS_XPD(XPD_TYPE_PRI); module_init(card_pri_startup); diff --git a/drivers/dahdi/xpp/parport_debug.c b/drivers/dahdi/xpp/parport_debug.c index 6665992..2a03352 100644 --- a/drivers/dahdi/xpp/parport_debug.c +++ b/drivers/dahdi/xpp/parport_debug.c @@ -103,7 +103,6 @@ void __exit parallel_dbg_cleanup(void) MODULE_DESCRIPTION("Use parallel port to debug drivers"); MODULE_AUTHOR("Oron Peled "); MODULE_LICENSE("GPL"); -MODULE_VERSION("$Id:"); module_init(parallel_dbg_init); module_exit(parallel_dbg_cleanup); diff --git a/drivers/dahdi/xpp/xdefs.h b/drivers/dahdi/xpp/xdefs.h index b15fa05..61e071a 100644 --- a/drivers/dahdi/xpp/xdefs.h +++ b/drivers/dahdi/xpp/xdefs.h @@ -22,8 +22,6 @@ * */ -#include "xpp_version.h" - #ifdef __KERNEL__ #include diff --git a/drivers/dahdi/xpp/xpp_dahdi.c b/drivers/dahdi/xpp/xpp_dahdi.c index 6c30b81..03fb7e6 100644 --- a/drivers/dahdi/xpp/xpp_dahdi.c +++ b/drivers/dahdi/xpp/xpp_dahdi.c @@ -1195,8 +1195,7 @@ static int __init xpp_dahdi_init(void) int ret = 0; void *top = NULL; - INFO("revision %s MAX_XPDS=%d (%d*%d)\n", XPP_VERSION, MAX_XPDS, - MAX_UNIT, MAX_SUBUNIT); + INFO("MAX_XPDS=%d (%d*%d)\n", MAX_XPDS, MAX_UNIT, MAX_SUBUNIT); #ifdef CONFIG_PROC_FS xpp_proc_toplevel = proc_mkdir(PROC_DIR, NULL); if (!xpp_proc_toplevel) { @@ -1232,7 +1231,6 @@ static void __exit xpp_dahdi_cleanup(void) MODULE_DESCRIPTION("XPP Dahdi Driver"); MODULE_AUTHOR("Oron Peled "); MODULE_LICENSE("GPL"); -MODULE_VERSION(XPP_VERSION); module_init(xpp_dahdi_init); module_exit(xpp_dahdi_cleanup); diff --git a/drivers/dahdi/xpp/xpp_usb.c b/drivers/dahdi/xpp/xpp_usb.c index b0a9903..fa48157 100644 --- a/drivers/dahdi/xpp/xpp_usb.c +++ b/drivers/dahdi/xpp/xpp_usb.c @@ -1024,7 +1024,6 @@ static int __init xpp_usb_init(void) int ret; //xusb_t *xusb; - INFO("revision %s\n", XPP_VERSION); xusb_cache = kmem_cache_create("xusb_cache", sizeof(xframe_t) + XFRAME_DATASIZE, #if (LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 22)) && defined(CONFIG_SLUB) @@ -1144,7 +1143,6 @@ static const struct file_operations xusb_read_proc_ops = { MODULE_DESCRIPTION("XPP USB Transport Driver"); MODULE_AUTHOR("Oron Peled "); MODULE_LICENSE("GPL"); -MODULE_VERSION(XPP_VERSION); module_init(xpp_usb_init); module_exit(xpp_usb_shutdown);