X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Ftelephony%2Fphonedev.c;h=3c987f49f6b4c382a46e01a66c6f519ecdfd2124;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=3300eeb1f71b20a4cd4a5026b9dd0f09c2dee165;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/drivers/telephony/phonedev.c b/drivers/telephony/phonedev.c index 3300eeb1f..3c987f49f 100644 --- a/drivers/telephony/phonedev.c +++ b/drivers/telephony/phonedev.c @@ -28,7 +28,7 @@ #include #include - +#include #define PHONE_NUM_DEVICES 256 @@ -105,6 +105,8 @@ int phone_register_device(struct phone_device *p, int unit) 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 +124,7 @@ void phone_unregister_device(struct phone_device *pfd) 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); }