[svn-commits] fjoe: freebsd/trunk r8867 - in /freebsd/trunk: drivers/dahdi/ drivers/dahdi/w...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Jul 8 08:48:37 CDT 2010


Author: fjoe
Date: Thu Jul  8 08:48:33 2010
New Revision: 8867

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=8867
Log:
Define THIS_MODULE for HW drivers.

Modified:
    freebsd/trunk/drivers/dahdi/wcb4xxp/base.c
    freebsd/trunk/drivers/dahdi/wcfxo.c
    freebsd/trunk/drivers/dahdi/wct4xxp/base.c
    freebsd/trunk/drivers/dahdi/wctdm.c
    freebsd/trunk/drivers/dahdi/wctdm24xxp/base.c
    freebsd/trunk/drivers/dahdi/wcte11xp.c
    freebsd/trunk/drivers/dahdi/wcte12xp/base.c
    freebsd/trunk/include/dahdi/compat/bsd.h

Modified: freebsd/trunk/drivers/dahdi/wcb4xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/wcb4xxp/base.c?view=diff&rev=8867&r1=8866&r2=8867
==============================================================================
--- freebsd/trunk/drivers/dahdi/wcb4xxp/base.c (original)
+++ freebsd/trunk/drivers/dahdi/wcb4xxp/base.c Thu Jul  8 08:48:33 2010
@@ -3097,7 +3097,7 @@
 
 static devclass_t b4xxp_devclass;
 
-DRIVER_MODULE(wcb4xxp, pci, b4xxp_pci_driver, b4xxp_devclass, 0, 0);
+DAHDI_DRIVER_MODULE(wcb4xxp, pci, b4xxp_pci_driver, b4xxp_devclass, 0, 0);
 MODULE_DEPEND(wcb4xxp, pci, 1, 1, 1);
 MODULE_DEPEND(wcb4xxp, dahdi, 1, 1, 1);
 

Modified: freebsd/trunk/drivers/dahdi/wcfxo.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/wcfxo.c?view=diff&rev=8867&r1=8866&r2=8867
==============================================================================
--- freebsd/trunk/drivers/dahdi/wcfxo.c (original)
+++ freebsd/trunk/drivers/dahdi/wcfxo.c Thu Jul  8 08:48:33 2010
@@ -1324,7 +1324,7 @@
 
 static devclass_t wcfxo_devclass;
 
-DRIVER_MODULE(wcfxo, pci, wcfxo_pci_driver, wcfxo_devclass, 0, 0);
+DAHDI_DRIVER_MODULE(wcfxo, pci, wcfxo_pci_driver, wcfxo_devclass, 0, 0);
 MODULE_DEPEND(wcfxo, pci, 1, 1, 1);
 MODULE_DEPEND(wcfxo, dahdi, 1, 1, 1);
 #else /* !__FreeBSD__ */

Modified: freebsd/trunk/drivers/dahdi/wct4xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/wct4xxp/base.c?view=diff&rev=8867&r1=8866&r2=8867
==============================================================================
--- freebsd/trunk/drivers/dahdi/wct4xxp/base.c (original)
+++ freebsd/trunk/drivers/dahdi/wct4xxp/base.c Thu Jul  8 08:48:33 2010
@@ -4668,7 +4668,7 @@
 
 static devclass_t t4_devclass;
 
-DRIVER_MODULE(wct4xxp, pci, t4_pci_driver, t4_devclass, 0, 0);
+DAHDI_DRIVER_MODULE(wct4xxp, pci, t4_pci_driver, t4_devclass, 0, 0);
 MODULE_DEPEND(wct4xxp, pci, 1, 1, 1);
 MODULE_DEPEND(wct4xxp, dahdi, 1, 1, 1);
 MODULE_DEPEND(wct4xxp, firmware, 1, 1, 1);

Modified: freebsd/trunk/drivers/dahdi/wctdm.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/wctdm.c?view=diff&rev=8867&r1=8866&r2=8867
==============================================================================
--- freebsd/trunk/drivers/dahdi/wctdm.c (original)
+++ freebsd/trunk/drivers/dahdi/wctdm.c Thu Jul  8 08:48:33 2010
@@ -3079,7 +3079,7 @@
 
 static devclass_t wctdm_devclass;
 
-DRIVER_MODULE(wctdm, pci, wctdm_pci_driver, wctdm_devclass, 0, 0);
+DAHDI_DRIVER_MODULE(wctdm, pci, wctdm_pci_driver, wctdm_devclass, 0, 0);
 MODULE_DEPEND(wctdm, pci, 1, 1, 1);
 MODULE_DEPEND(wctdm, dahdi, 1, 1, 1);
 #else /* !__FreeBSD__ */

Modified: freebsd/trunk/drivers/dahdi/wctdm24xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=8867&r1=8866&r2=8867
==============================================================================
--- freebsd/trunk/drivers/dahdi/wctdm24xxp/base.c (original)
+++ freebsd/trunk/drivers/dahdi/wctdm24xxp/base.c Thu Jul  8 08:48:33 2010
@@ -5203,7 +5203,7 @@
 
 static devclass_t wctdm_devclass;
 
-DRIVER_MODULE(wctdm24xxp, pci, wctdm_pci_driver, wctdm_devclass, wctdm_modevent, 0);
+DAHDI_DRIVER_MODULE(wctdm24xxp, pci, wctdm_pci_driver, wctdm_devclass, wctdm_modevent, 0);
 MODULE_DEPEND(wctdm24xxp, pci, 1, 1, 1);
 MODULE_DEPEND(wctdm24xxp, dahdi, 1, 1, 1);
 MODULE_DEPEND(wctdm24xxp, dahdi_voicebus, 1, 1, 1);

Modified: freebsd/trunk/drivers/dahdi/wcte11xp.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/wcte11xp.c?view=diff&rev=8867&r1=8866&r2=8867
==============================================================================
--- freebsd/trunk/drivers/dahdi/wcte11xp.c (original)
+++ freebsd/trunk/drivers/dahdi/wcte11xp.c Thu Jul  8 08:48:33 2010
@@ -1851,7 +1851,7 @@
 
 static devclass_t t1xxp_devclass;
 
-DRIVER_MODULE(t1xxp, pci, t1xxp_pci_driver, t1xxp_devclass, 0, 0);
+DAHDI_DRIVER_MODULE(t1xxp, pci, t1xxp_pci_driver, t1xxp_devclass, 0, 0);
 MODULE_DEPEND(t1xxp, pci, 1, 1, 1);
 MODULE_DEPEND(t1xxp, dahdi, 1, 1, 1);
 #else /* !__FreeBSD__ */

Modified: freebsd/trunk/drivers/dahdi/wcte12xp/base.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/wcte12xp/base.c?view=diff&rev=8867&r1=8866&r2=8867
==============================================================================
--- freebsd/trunk/drivers/dahdi/wcte12xp/base.c (original)
+++ freebsd/trunk/drivers/dahdi/wcte12xp/base.c Thu Jul  8 08:48:33 2010
@@ -2074,7 +2074,7 @@
 	cmd_cache = uma_zcreate("wcte12xp", sizeof(struct command),
 	    NULL, NULL, NULL, NULL, 0, 0);
 	if (cmd_cache == NULL) {
-		printf("wcte12xp: can not allocate UMA zone\n");
+		printf("%s: can not allocate UMA zone\n", THIS_MODULE->name);
 		return (ENXIO);
 	}
 
@@ -2116,7 +2116,7 @@
 
 static devclass_t te12xp_devclass;
 
-DRIVER_MODULE(te12xp, pci, te12xp_pci_driver, te12xp_devclass, te12xp_modevent, 0);
+DAHDI_DRIVER_MODULE(te12xp, pci, te12xp_pci_driver, te12xp_devclass, te12xp_modevent, 0);
 MODULE_DEPEND(te12xp, pci, 1, 1, 1);
 MODULE_DEPEND(te12xp, dahdi, 1, 1, 1);
 MODULE_DEPEND(te12xp, dahdi_voicebus, 1, 1, 1);

Modified: freebsd/trunk/include/dahdi/compat/bsd.h
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/include/dahdi/compat/bsd.h?view=diff&rev=8867&r1=8866&r2=8867
==============================================================================
--- freebsd/trunk/include/dahdi/compat/bsd.h (original)
+++ freebsd/trunk/include/dahdi/compat/bsd.h Thu Jul  8 08:48:33 2010
@@ -336,9 +336,16 @@
 
 #define THIS_MODULE (&_this_module)
 
+#define DAHDI_MODULE(name)				\
+	struct module _this_module = { #name }
+
 #define DAHDI_DEV_MODULE(name, evh, arg)		\
 	DEV_MODULE(name, evh, arg);			\
-	struct module _this_module = { #name }
+	DAHDI_MODULE(name)
+
+#define DAHDI_DRIVER_MODULE(name, busname, driver, devclass, evh, arg)	\
+	DRIVER_MODULE(name, busname, driver, devclass, evh, arg);	\
+	DAHDI_MODULE(name)
 
 int request_module(const char *fmt, ...);
 




More information about the svn-commits mailing list