summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2008-05-22 12:18:11 +0000
committerKevin P. Fleming <kpfleming@digium.com>2008-05-22 12:18:11 +0000
commit51d0dce98f109bef2bfa47feb3810c13f97fef13 (patch)
tree635b8bb5a5281b57e3c8769a33f2bbfa984c534e /drivers
parent4d28bda862b8f971e103d6667cf1be5bd84dc8c7 (diff)
and with one fell swoop... devfs support disappears
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4326 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers')
-rw-r--r--drivers/dahdi/dahdi-base.c116
-rw-r--r--drivers/dahdi/dahdi_dynamic.c3
-rw-r--r--drivers/dahdi/dahdi_dynamic_eth.c4
-rw-r--r--drivers/dahdi/dahdi_dynamic_loc.c4
-rw-r--r--drivers/dahdi/dahdi_transcode.c3
-rw-r--r--drivers/dahdi/wctc4xxp/base.c3
6 files changed, 5 insertions, 128 deletions
diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c
index 21cbb90..ce6ebd7 100644
--- a/drivers/dahdi/dahdi-base.c
+++ b/drivers/dahdi/dahdi-base.c
@@ -47,18 +47,18 @@
#include <linux/version.h>
#include <linux/ctype.h>
#include <linux/kmod.h>
-#ifdef CONFIG_DEVFS_FS
-#include <linux/devfs_fs_kernel.h>
-#endif /* CONFIG_DEVFS_FS */
+
#ifdef CONFIG_DAHDI_NET
#include <linux/netdevice.h>
#endif /* CONFIG_DAHDI_NET */
+
#include <linux/ppp_defs.h>
#ifdef CONFIG_DAHDI_PPP
#include <linux/netdevice.h>
#include <linux/if.h>
#include <linux/if_ppp.h>
#endif
+
#include <asm/atomic.h>
#ifndef CONFIG_OLD_HDLC_API
@@ -152,15 +152,6 @@ EXPORT_SYMBOL(dahdi_unregister_chardev);
static struct proc_dir_entry *proc_entries[DAHDI_MAX_SPANS];
#endif
-/* Here are a couple important little additions for devfs */
-#ifdef CONFIG_DEVFS_FS
-static devfs_handle_t dahdi_devfs_dir;
-static devfs_handle_t channel;
-static devfs_handle_t pseudo;
-static devfs_handle_t ctl;
-static devfs_handle_t timer;
-#endif
-
/* udev necessary data structures. Yeah! */
#ifdef CONFIG_DAHDI_UDEV
@@ -1328,51 +1319,6 @@ static void dahdi_set_law(struct dahdi_chan *chan, int law)
}
}
-#ifdef CONFIG_DEVFS_FS
-static devfs_handle_t register_devfs_channel(struct dahdi_chan *chan, devfs_handle_t dir)
-{
- char path[100];
- char link[100];
- char buf[50];
- char tmp[100];
- int link_offset = 0;
- int tmp_offset = 0;
- int path_offset = 0;
- int err = 0;
- devfs_handle_t chan_dev;
- umode_t mode = S_IFCHR|S_IRUGO|S_IWUGO;
- unsigned int flags = DEVFS_FL_AUTO_OWNER;
-
- sprintf(path, "%d", chan->chanpos);
- chan_dev = devfs_register(dir, path, flags, DAHDI_MAJOR, chan->channo, mode, &dahdi_fops, NULL);
- if (!chan_dev) {
- printk("DAHDI: Something really bad happened. Unable to register devfs entry\n");
- return NULL;
- }
-
- /* Set up the path of the destination of the link */
- link_offset = devfs_generate_path(chan_dev, link, sizeof(link) - 1);
- /* Now we need to strip off the leading "zap/". If we don't, then we build a broken symlink */
- path_offset = devfs_generate_path(dahdi_devfs_dir, path, sizeof(path) - 1); /* We'll just "borrow" path for a second */
- path_offset = strlen(path+path_offset);
- link_offset += path_offset; /* Taking out the "zap" */
- link_offset++; /* Add one more place for the '/'. The path generated does not contain the '/' we need to strip */
-
- /* Set up the path of the file/link itself */
- tmp_offset = devfs_generate_path(dahdi_devfs_dir, tmp, sizeof(tmp) - 1);
- sprintf(buf, "/%d", chan->channo);
- dahdi_copy_string(path, tmp+tmp_offset, sizeof(path));
- strncat(path, buf, sizeof(path) - 1);
-
- err = devfs_mk_symlink(NULL, path, DEVFS_FL_DEFAULT, link+link_offset, &chan->fhandle_symlink, NULL);
- if (err != 0) {
- printk("Problem with making devfs symlink: %d\n", err);
- }
-
- return chan_dev;
-}
-#endif /* CONFIG_DEVFS_FS */
-
static int dahdi_chan_reg(struct dahdi_chan *chan)
{
int x;
@@ -5211,18 +5157,6 @@ int dahdi_register(struct dahdi_span *span, int prefmaster)
proc_entries[span->spanno] = create_proc_read_entry(tempfile, 0444, NULL , dahdi_proc_read, (int *)(long)span->spanno);
#endif
-#ifdef CONFIG_DEVFS_FS
- {
- char span_name[50];
- sprintf(span_name, "span%d", span->spanno);
- span->dhandle = devfs_mk_dir(dahdi_devfs_dir, span_name, NULL);
- for (x = 0; x < span->channels; x++) {
- struct dahdi_chan *chan = &span->chans[x];
- chan->fhandle = register_devfs_channel(chan, chan->span->dhandle); /* Register our stuff with devfs */
- }
- }
-#endif /* CONFIG_DEVFS_FS */
-
#ifdef CONFIG_DAHDI_UDEV
for (x = 0; x < span->channels; x++) {
char chan_name[50];
@@ -5272,13 +5206,6 @@ int dahdi_unregister(struct dahdi_span *span)
sprintf(tempfile, "dahdi/%d", span->spanno);
remove_proc_entry(tempfile, NULL);
#endif /* CONFIG_PROC_FS */
-#ifdef CONFIG_DEVFS_FS
- for (x = 0; x < span->channels; x++) {
- devfs_unregister(span->chans[x].fhandle);
- devfs_unregister(span->chans[x].fhandle_symlink);
- }
- devfs_unregister(span->dhandle);
-#endif /* CONFIG_DEVFS_FS */
#ifdef CONFIG_DAHDI_UDEV
for (x = 0; x < span->channels; x++) {
@@ -7682,10 +7609,6 @@ static void __exit watchdog_cleanup(void)
int dahdi_register_chardev(struct dahdi_chardev *dev)
{
-#ifdef CONFIG_DEVFS_FS
- umode_t mode = S_IFCHR|S_IRUGO|S_IWUGO;
-#endif /* CONFIG_DEVFS_FS */
-
#ifdef CONFIG_DAHDI_UDEV
char udevname[strlen(dev->name) + 3];
@@ -7693,10 +7616,6 @@ int dahdi_register_chardev(struct dahdi_chardev *dev)
strcat(udevname, dev->name);
CLASS_DEV_CREATE(dahdi_class, MKDEV(DAHDI_MAJOR, dev->minor), NULL, udevname);
#endif /* CONFIG_DAHDI_UDEV */
-
-#ifdef CONFIG_DEVFS_FS
- dev->devfs_handle = devfs_register(dahdi_devfs_dir, dev->name, DEVFS_FL_DEFAULT, DAHDI_MAJOR, dev->minor, mode, &dahdi_fops, NULL);
-#endif /* CONFIG_DEVFS_FS */
return 0;
}
@@ -7707,10 +7626,6 @@ int dahdi_unregister_chardev(struct dahdi_chardev *dev)
class_device_destroy(dahdi_class, MKDEV(DAHDI_MAJOR, dev->minor));
#endif /* CONFIG_DAHDI_UDEV */
-#ifdef CONFIG_DEVFS_FS
- devfs_unregister(dev->devfs_handle);
-#endif /* CONFIG_DEVFS_FS */
-
return 0;
}
@@ -7729,24 +7644,10 @@ static int __init dahdi_init(void) {
CLASS_DEV_CREATE(dahdi_class, MKDEV(DAHDI_MAJOR, 0), NULL, "zapctl");
#endif /* CONFIG_DAHDI_UDEV */
-#ifdef CONFIG_DEVFS_FS
- {
- umode_t mode = S_IFCHR|S_IRUGO|S_IWUGO;
-
- devfs_register_chrdev(DAHDI_MAJOR, "dahdi", &dahdi_fops);
- if (!(dahdi_devfs_dir = devfs_mk_dir(NULL, "zap", NULL)))
- return -EBUSY; /* This would be bad */
- timer = devfs_register(dahdi_devfs_dir, "timer", DEVFS_FL_DEFAULT, DAHDI_MAJOR, 253, mode, &dahdi_fops, NULL);
- channel = devfs_register(dahdi_devfs_dir, "channel", DEVFS_FL_DEFAULT, DAHDI_MAJOR, 254, mode, &dahdi_fops, NULL);
- pseudo = devfs_register(dahdi_devfs_dir, "pseudo", DEVFS_FL_DEFAULT, DAHDI_MAJOR, 255, mode, &dahdi_fops, NULL);
- ctl = devfs_register(dahdi_devfs_dir, "ctl", DEVFS_FL_DEFAULT, DAHDI_MAJOR, 0, mode, &dahdi_fops, NULL);
- }
-#else
if ((res = register_chrdev(DAHDI_MAJOR, "dahdi", &dahdi_fops))) {
printk(KERN_ERR "Unable to register DAHDI character device handler on %d\n", DAHDI_MAJOR);
return res;
}
-#endif /* CONFIG_DEVFS_FS */
printk(KERN_INFO "DAHDI Telephony Interface Registered on major %d\n", DAHDI_MAJOR);
printk(KERN_INFO "DAHDI Version: %s\n", DAHDI_VERSION);
@@ -7774,14 +7675,6 @@ static void __exit dahdi_cleanup(void) {
kfree(tone_zones[x]);
}
-#ifdef CONFIG_DEVFS_FS
- devfs_unregister(timer);
- devfs_unregister(channel);
- devfs_unregister(pseudo);
- devfs_unregister(ctl);
- devfs_unregister(dahdi_devfs_dir);
- devfs_unregister_chrdev(DAHDI_MAJOR, "dahdi");
-#else
#ifdef CONFIG_DAHDI_UDEV
class_device_destroy(dahdi_class, MKDEV(DAHDI_MAJOR, 253)); /* timer */
class_device_destroy(dahdi_class, MKDEV(DAHDI_MAJOR, 254)); /* channel */
@@ -7789,8 +7682,9 @@ static void __exit dahdi_cleanup(void) {
class_device_destroy(dahdi_class, MKDEV(DAHDI_MAJOR, 0)); /* ctl */
class_destroy(dahdi_class);
#endif /* CONFIG_DAHDI_UDEV */
+
unregister_chrdev(DAHDI_MAJOR, "dahdi");
-#endif
+
#ifdef CONFIG_DAHDI_WATCHDOG
watchdog_cleanup();
#endif
diff --git a/drivers/dahdi/dahdi_dynamic.c b/drivers/dahdi/dahdi_dynamic.c
index 14bb913..c379918 100644
--- a/drivers/dahdi/dahdi_dynamic.c
+++ b/drivers/dahdi/dahdi_dynamic.c
@@ -33,9 +33,6 @@
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/vmalloc.h>
-#ifdef CONFIG_DEVFS_FS
-#include <linux/devfs_fs_kernel.h>
-#endif
#include <dahdi/kernel.h>
#include <dahdi/user.h>
diff --git a/drivers/dahdi/dahdi_dynamic_eth.c b/drivers/dahdi/dahdi_dynamic_eth.c
index e09da00..da91907 100644
--- a/drivers/dahdi/dahdi_dynamic_eth.c
+++ b/drivers/dahdi/dahdi_dynamic_eth.c
@@ -33,10 +33,6 @@
#include <linux/netdevice.h>
#include <linux/notifier.h>
-#ifdef CONFIG_DEVFS_FS
-#include <linux/devfs_fs_kernel.h>
-#endif
-
#include <dahdi/kernel.h>
#include <dahdi/user.h>
diff --git a/drivers/dahdi/dahdi_dynamic_loc.c b/drivers/dahdi/dahdi_dynamic_loc.c
index df0d95d..f16d68f 100644
--- a/drivers/dahdi/dahdi_dynamic_loc.c
+++ b/drivers/dahdi/dahdi_dynamic_loc.c
@@ -57,10 +57,6 @@
#include <linux/netdevice.h>
#include <linux/notifier.h>
-#ifdef CONFIG_DEVFS_FS
-#include <linux/devfs_fs_kernel.h>
-#endif
-
#include <dahdi/kernel.h>
#include <dahdi/user.h>
diff --git a/drivers/dahdi/dahdi_transcode.c b/drivers/dahdi/dahdi_transcode.c
index 95f6a24..4788f74 100644
--- a/drivers/dahdi/dahdi_transcode.c
+++ b/drivers/dahdi/dahdi_transcode.c
@@ -36,9 +36,6 @@
#include <linux/mm.h>
#include <linux/page-flags.h>
#include <asm/io.h>
-#ifdef CONFIG_DEVFS_FS
-#include <linux/devfs_fs_kernel.h>
-#endif
#ifdef LINUX26
#include <linux/moduleparam.h>
diff --git a/drivers/dahdi/wctc4xxp/base.c b/drivers/dahdi/wctc4xxp/base.c
index 8f71f07..b0705bf 100644
--- a/drivers/dahdi/wctc4xxp/base.c
+++ b/drivers/dahdi/wctc4xxp/base.c
@@ -43,9 +43,6 @@
#include <linux/workqueue.h>
#include <linux/moduleparam.h>
#include <linux/firmware.h>
-#ifdef CONFIG_DEVFS_FS
-#include <linux/devfs_fs_kernel.h>
-#endif
#include <dahdi/kernel.h>
#include <dahdi/user.h>