Messages in this thread Patch in this message | | | From | Paul King <> | Subject | [PATCH] 2.6.7 Telephony support devfs | Date | Fri, 2 Jul 2004 19:06:12 +0100 |
| |
Add devfs support to telephony devices. Only tested with a single telephony device. Devices name phone/<minor>. Patch against 2.6.7.
--- phonedev.c 2004-06-16 05:19:37.000000000 +0000 +++ /usr/src/linux/drivers/telephony/phonedev.c 2004-07-02 19:09: 46.951837584 +0000 @@ -28,7 +28,7 @@
#include <linux/kmod.h> #include <linux/sem.h> - +#include <linux/devfs_fs_kernel.h>
#define PHONE_NUM_DEVICES 256
@@ -105,6 +105,7 @@ if (phone_device[i] == NULL) { phone_device[i] = p; p->minor = i; + devfs_mk_cdev(MKDEV(PHONE_MAJOR,i),S_IFCHR|S_IRUSR|S_IWUSR, "phone/%d",i); up(&phone_lock); return 0; } @@ -122,6 +123,7 @@ down(&phone_lock); if (phone_device[pfd->minor] != pfd) panic("phone: bad unregister"); + devfs_remove("phone/%d",pfd->minor); phone_device[pfd->minor] = NULL; up(&phone_lock); }
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |