[zaptel-commits] tzafrir: branch 1.4 r3785 - in /branches/1.4: zaptel-base.c zaptel.h
SVN commits to the Zaptel project
zaptel-commits at lists.digium.com
Sat Feb 2 21:43:11 CST 2008
Author: tzafrir
Date: Sat Feb 2 21:43:11 2008
New Revision: 3785
URL: http://svn.digium.com/view/zaptel?view=rev&rev=3785
Log:
Fix building in 2.4 w/devfs. Closes issue #11884
(There's still the msleep warning).
Modified:
branches/1.4/zaptel-base.c
branches/1.4/zaptel.h
Modified: branches/1.4/zaptel-base.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/zaptel-base.c?view=diff&rev=3785&r1=3784&r2=3785
==============================================================================
--- branches/1.4/zaptel-base.c (original)
+++ branches/1.4/zaptel-base.c Sat Feb 2 21:43:11 2008
@@ -153,6 +153,7 @@
/* Here are a couple important little additions for devfs */
#ifdef CONFIG_DEVFS_FS
+#define ZT_DEVFS_MODE (S_IFCHR|S_IRUGO|S_IWUGO)
static devfs_handle_t zaptel_devfs_dir;
static devfs_handle_t channel;
static devfs_handle_t pseudo;
@@ -7345,7 +7346,7 @@
#endif /* CONFIG_ZAP_UDEV */
#ifdef CONFIG_DEVFS_FS
- dev->devfs_handle = devfs_register(zaptel_devfs_dir, dev->name, DEVFS_FL_DEFAULT, ZT_MAJOR, dev->minor, mode, &zt_fops, NULL);
+ dev->devfs_handle = devfs_register(zaptel_devfs_dir, dev->name, DEVFS_FL_DEFAULT, ZT_MAJOR, dev->minor, ZT_DEVFS_MODE, &zt_fops, NULL);
#endif /* CONFIG_DEVFS_FS */
return 0;
@@ -7381,15 +7382,13 @@
#ifdef CONFIG_DEVFS_FS
{
- umode_t mode = S_IFCHR|S_IRUGO|S_IWUGO;
-
devfs_register_chrdev(ZT_MAJOR, "zaptel", &zt_fops);
if (!(zaptel_devfs_dir = devfs_mk_dir(NULL, "zap", NULL)))
return -EBUSY; /* This would be bad */
- timer = devfs_register(zaptel_devfs_dir, "timer", DEVFS_FL_DEFAULT, ZT_MAJOR, 253, mode, &zt_fops, NULL);
- channel = devfs_register(zaptel_devfs_dir, "channel", DEVFS_FL_DEFAULT, ZT_MAJOR, 254, mode, &zt_fops, NULL);
- pseudo = devfs_register(zaptel_devfs_dir, "pseudo", DEVFS_FL_DEFAULT, ZT_MAJOR, 255, mode, &zt_fops, NULL);
- ctl = devfs_register(zaptel_devfs_dir, "ctl", DEVFS_FL_DEFAULT, ZT_MAJOR, 0, mode, &zt_fops, NULL);
+ timer = devfs_register(zaptel_devfs_dir, "timer", DEVFS_FL_DEFAULT, ZT_MAJOR, 253, ZT_DEVFS_MODE, &zt_fops, NULL);
+ channel = devfs_register(zaptel_devfs_dir, "channel", DEVFS_FL_DEFAULT, ZT_MAJOR, 254, ZT_DEVFS_MODE, &zt_fops, NULL);
+ pseudo = devfs_register(zaptel_devfs_dir, "pseudo", DEVFS_FL_DEFAULT, ZT_MAJOR, 255, ZT_DEVFS_MODE, &zt_fops, NULL);
+ ctl = devfs_register(zaptel_devfs_dir, "ctl", DEVFS_FL_DEFAULT, ZT_MAJOR, 0, ZT_DEVFS_MODE, &zt_fops, NULL);
}
#else
if ((res = register_chrdev(ZT_MAJOR, "zaptel", &zt_fops))) {
Modified: branches/1.4/zaptel.h
URL: http://svn.digium.com/view/zaptel/branches/1.4/zaptel.h?view=diff&rev=3785&r1=3784&r2=3785
==============================================================================
--- branches/1.4/zaptel.h (original)
+++ branches/1.4/zaptel.h Sat Feb 2 21:43:11 2008
@@ -1203,7 +1203,7 @@
const char *name;
__u8 minor;
#ifdef CONFIG_DEVFS_FS
- static devfs_handle_t devfs_handle;
+ devfs_handle_t devfs_handle;
#endif
};
More information about the zaptel-commits
mailing list