No subject
Thu Jan 15 22:29:28 CST 2009
Modified:
branches/1.4/kernel/xpp/card_bri.c
branches/1.4/kernel/xpp/card_fxo.c
branches/1.4/kernel/xpp/card_fxs.c
branches/1.4/kernel/xpp/card_global.c
branches/1.4/kernel/xpp/card_pri.c
branches/1.4/kernel/xpp/xbus-core.c
branches/1.4/kernel/xpp/xdefs.h
branches/1.4/kernel/xpp/xpp_usb.c
branches/1.4/kernel/xpp/xpp_zap.c
Modified: branches/1.4/kernel/xpp/card_bri.c
URL: http://svn.asterisk.org/svn-view/zaptel/branches/1.4/kernel/xpp/card_bri.c?view=diff&rev=4648&r1=4647&r2=4648
==============================================================================
--- branches/1.4/kernel/xpp/card_bri.c (original)
+++ branches/1.4/kernel/xpp/card_bri.c Wed May 27 08:02:44 2009
@@ -799,7 +799,7 @@
XPD_ERR(xpd, "Failed to create proc file '%s'\n", PROC_BRI_INFO_FNAME);
goto err;
}
- priv->bri_info->owner = THIS_MODULE;
+ SET_PROC_DIRENTRY_OWNER(priv->bri_info);
#endif
return 0;
err:
Modified: branches/1.4/kernel/xpp/card_fxo.c
URL: http://svn.asterisk.org/svn-view/zaptel/branches/1.4/kernel/xpp/card_fxo.c?view=diff&rev=4648&r1=4647&r2=4648
==============================================================================
--- branches/1.4/kernel/xpp/card_fxo.c (original)
+++ branches/1.4/kernel/xpp/card_fxo.c Wed May 27 08:02:44 2009
@@ -411,7 +411,7 @@
XPD_ERR(xpd, "Failed to create proc file '%s'\n", PROC_FXO_INFO_FNAME);
goto err;
}
- priv->fxo_info->owner = THIS_MODULE;
+ SET_PROC_DIRENTRY_OWNER(priv->fxo_info);
#ifdef WITH_METERING
XPD_DBG(PROC, xpd, "Creating Metering tone file\n");
priv->meteringfile = create_proc_read_entry(PROC_METERING_FNAME, 0444, xpd->proc_xpd_dir,
@@ -420,7 +420,7 @@
XPD_ERR(xpd, "Failed to create proc file '%s'\n", PROC_METERING_FNAME);
goto err;
}
- priv->meteringfile->owner = THIS_MODULE;
+ SET_PROC_DIRENTRY_OWNER(priv->meteringfile);
#endif
#endif
return 0;
Modified: branches/1.4/kernel/xpp/card_fxs.c
URL: http://svn.asterisk.org/svn-view/zaptel/branches/1.4/kernel/xpp/card_fxs.c?view=diff&rev=4648&r1=4647&r2=4648
==============================================================================
--- branches/1.4/kernel/xpp/card_fxs.c (original)
+++ branches/1.4/kernel/xpp/card_fxs.c Wed May 27 08:02:44 2009
@@ -358,7 +358,7 @@
XPD_ERR(xpd, "Failed to create proc file '%s'\n", PROC_FXS_INFO_FNAME);
goto err;
}
- priv->fxs_info->owner = THIS_MODULE;
+ SET_PROC_DIRENTRY_OWNER(priv->fxs_info);
#ifdef WITH_METERING
XPD_DBG(PROC, xpd, "Creating Metering tone file\n");
priv->meteringfile = create_proc_entry(PROC_METERING_FNAME, 0200, xpd->proc_xpd_dir);
@@ -366,7 +366,7 @@
XPD_ERR(xpd, "Failed to create proc file '%s'\n", PROC_METERING_FNAME);
goto err;
}
- priv->meteringfile->owner = THIS_MODULE;
+ SET_PROC_DIRENTRY_OWNER(priv->meteringfile);
priv->meteringfile->write_proc = proc_xpd_metering_write;
priv->meteringfile->read_proc = NULL;
priv->meteringfile->data = xpd;
Modified: branches/1.4/kernel/xpp/card_global.c
URL: http://svn.asterisk.org/svn-view/zaptel/branches/1.4/kernel/xpp/card_global.c?view=diff&rev=4648&r1=4647&r2=4648
==============================================================================
--- branches/1.4/kernel/xpp/card_global.c (original)
+++ branches/1.4/kernel/xpp/card_global.c Wed May 27 08:02:44 2009
@@ -402,7 +402,7 @@
XPD_ERR(xpd, "Failed to create proc file '%s'\n", CHIP_REGISTERS);
goto err;
}
- xpd->proc_xpd_chipregs->owner = THIS_MODULE;
+ SET_PROC_DIRENTRY_OWNER(priv->proc_xpd_chipregs);
xpd->proc_xpd_chipregs->write_proc = proc_xpd_register_write;
xpd->proc_xpd_chipregs->read_proc = proc_xpd_register_read;
xpd->proc_xpd_chipregs->data = xpd;
Modified: branches/1.4/kernel/xpp/card_pri.c
URL: http://svn.asterisk.org/svn-view/zaptel/branches/1.4/kernel/xpp/card_pri.c?view=diff&rev=4648&r1=4647&r2=4648
==============================================================================
--- branches/1.4/kernel/xpp/card_pri.c (original)
+++ branches/1.4/kernel/xpp/card_pri.c Wed May 27 08:02:44 2009
@@ -421,7 +421,7 @@
XPD_ERR(xpd, "Failed to create proc '%s'\n", PROC_PRI_INFO_FNAME);
goto err;
}
- priv->pri_info->owner = THIS_MODULE;
+ SET_PROC_DIRENTRY_OWNER(priv->pri_info);
priv->pri_info->write_proc = proc_pri_info_write;
priv->pri_info->read_proc = proc_pri_info_read;
priv->pri_info->data = xpd;
Modified: branches/1.4/kernel/xpp/xbus-core.c
URL: http://svn.asterisk.org/svn-view/zaptel/branches/1.4/kernel/xpp/xbus-core.c?view=diff&rev=4648&r1=4647&r2=4648
==============================================================================
--- branches/1.4/kernel/xpp/xbus-core.c (original)
+++ branches/1.4/kernel/xpp/xbus-core.c Wed May 27 08:02:44 2009
@@ -1087,7 +1087,7 @@
XBUS_ERR(xbus, "Failed to create proc file '%s'\n", PROC_XBUS_WAITFOR_XPDS);
goto err;
}
- worker->proc_xbus_waitfor_xpds->owner = THIS_MODULE;
+ SET_PROC_DIRENTRY_OWNER(worker->proc_xbus_waitfor_xpds);
}
#endif
#endif
@@ -1398,7 +1398,7 @@
err = -EIO;
goto nobus;
}
- xbus->proc_xbus_summary->owner = THIS_MODULE;
+ SET_PROC_DIRENTRY_OWNER(xbus->proc_xbus_summary);
#ifdef PROTOCOL_DEBUG
xbus->proc_xbus_command = create_proc_entry(PROC_XBUS_COMMAND, 0200, xbus->proc_xbus_dir);
if (!xbus->proc_xbus_command) {
@@ -1408,7 +1408,7 @@
}
xbus->proc_xbus_command->write_proc = proc_xbus_command_write;
xbus->proc_xbus_command->data = xbus;
- xbus->proc_xbus_command->owner = THIS_MODULE;
+ SET_PROC_DIRENTRY_OWNER(xbus->proc_xbus_command);
#endif
#endif
#ifdef XPP_DEBUGFS
@@ -1857,7 +1857,7 @@
ret = -EFAULT;
goto err;
}
- proc_xbuses->owner = THIS_MODULE;
+ SET_PROC_DIRENTRY_OWNER(proc_xbuses);
#endif
#ifdef XPP_DEBUGFS
DBG(GENERAL, "Creating debugfs xpp root\n");
Modified: branches/1.4/kernel/xpp/xdefs.h
URL: http://svn.asterisk.org/svn-view/zaptel/branches/1.4/kernel/xpp/xdefs.h?view=diff&rev=4648&r1=4647&r2=4648
==============================================================================
--- branches/1.4/kernel/xpp/xdefs.h (original)
+++ branches/1.4/kernel/xpp/xdefs.h Wed May 27 08:02:44 2009
@@ -123,6 +123,11 @@
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
#define OLD_HOTPLUG_SUPPORT_269// for way older kernels
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
+#define SET_PROC_DIRENTRY_OWNER(p) do { (p)->owner = THIS_MODULE; } while(0);
+#else
+#define SET_PROC_DIRENTRY_OWNER(p) do { } while(0);
+#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)
#define DEVICE_ATTR_READER(name,dev,buf) \
Modified: branches/1.4/kernel/xpp/xpp_usb.c
URL: http://svn.asterisk.org/svn-view/zaptel/branches/1.4/kernel/xpp/xpp_usb.c?view=diff&rev=4648&r1=4647&r2=4648
==============================================================================
--- branches/1.4/kernel/xpp/xpp_usb.c (original)
+++ branches/1.4/kernel/xpp/xpp_usb.c Wed May 27 08:02:44 2009
@@ -755,7 +755,7 @@
retval = -EIO;
goto probe_failed;
}
- procsummary->owner = THIS_MODULE;
+ SET_PROC_DIRENTRY_OWNER(procsummary);
#endif
bus_count++;
xusb->xbus_num = xbus->num;
Modified: branches/1.4/kernel/xpp/xpp_zap.c
URL: http://svn.asterisk.org/svn-view/zaptel/branches/1.4/kernel/xpp/xpp_zap.c?view=diff&rev=4648&r1=4647&r2=4648
==============================================================================
--- branches/1.4/kernel/xpp/xpp_zap.c (original)
+++ branches/1.4/kernel/xpp/xpp_zap.c Wed May 27 08:02:44 2009
@@ -190,14 +190,14 @@
XPD_ERR(xpd, "Failed to create proc file '%s'\n", PROC_XPD_SUMMARY);
goto err;
}
- xpd->proc_xpd_summary->owner = THIS_MODULE;
+ SET_PROC_DIRENTRY_OWNER(xpd->proc_xpd_summary);
#ifdef OLD_PROC
xpd->proc_xpd_ztregister = create_proc_entry(PROC_XPD_ZTREGISTER, 0644, xpd->proc_xpd_dir);
if (!xpd->proc_xpd_ztregister) {
XPD_ERR(xpd, "Failed to create proc file '%s'\n", PROC_XPD_ZTREGISTER);
goto err;
}
- xpd->proc_xpd_ztregister->owner = THIS_MODULE;
+ SET_PROC_DIRENTRY_OWNER(xpd->proc_xpd_ztregister);
xpd->proc_xpd_ztregister->data = xpd;
xpd->proc_xpd_ztregister->read_proc = proc_xpd_ztregister_read;
xpd->proc_xpd_ztregister->write_proc = proc_xpd_ztregister_write;
@@ -206,7 +206,7 @@
XPD_ERR(xpd, "Failed to create proc file '%s'\n", PROC_XPD_BLINK);
goto err;
}
- xpd->proc_xpd_blink->owner = THIS_MODULE;
+ SET_PROC_DIRENTRY_OWNER(xpd->proc_xpd_blink);
xpd->proc_xpd_blink->data = xpd;
xpd->proc_xpd_blink->read_proc = proc_xpd_blink_read;
xpd->proc_xpd_blink->write_proc = proc_xpd_blink_write;
More information about the zaptel-commits
mailing list