User: Password:
|
|
Subscribe / Log in / New account

[PATCH] Fix capi devicenames v2

From:  "Marc - A. Dahlhaus" <mad-AT-wol.de>
To:  Kay Sievers <kay.sievers-AT-vrfy.org>
Subject:  [PATCH] Fix capi devicenames v2
Date:  Fri, 01 Oct 2010 10:02:53 +0200
Message-ID:  <1285920173.13411.34.camel@marc>
Cc:  Alan Cox <alan-AT-lxorguk.ukuu.org.uk>, linux-kernel-AT-vger.kernel.org, isdn-AT-linux-pingi.de
Archive-link:  Article

Specification in devices.txt about capi devices is out of date as the capifs
layout for capi tty devices was never added to it.

Recent udev versions can't produce working device nodes because of a typo in
the device_create call for the capi control device.

Due to this the wrong node name of the control device "capi" collides with
the "capi" directory under which the now deprecated capifs was mounted and
created the capi tty device nodes.

This also changes the capi tty device names passed to udev to the capifs
layout which isn't mentioned in the specs.

Signed-off-by: Marc - Andre Dahlhaus <mad@wol.de>

--- a/drivers/isdn/capi/capi.c
+++ b/drivers/isdn/capi/capi.c
@@ -1363,7 +1363,7 @@ static int __init capinc_tty_init(void)
 	}
 	drv->owner = THIS_MODULE;
 	drv->driver_name = "capi_nc";
-	drv->name = "capi";
+	drv->name = "capi/";
 	drv->major = 0;
 	drv->minor_start = 0;
 	drv->type = TTY_DRIVER_TYPE_SERIAL;
@@ -1509,7 +1509,7 @@ static int __init capi_init(void)
 		return PTR_ERR(capi_class);
 	}
 
-	device_create(capi_class, NULL, MKDEV(capi_major, 0), NULL, "capi");
+	device_create(capi_class, NULL, MKDEV(capi_major, 0), NULL, "capi20");
 
 	if (capinc_tty_init() < 0) {
 		device_destroy(capi_class, MKDEV(capi_major, 0));
Specification in devices.txt about capi devices is out of date as the capifs
layout for capi tty devices was never added to it.

Recent udev versions can't produce working device nodes because of a typo in
the device_create call for the capi control device.

Due to this the wrong node name of the control device "capi" collides with
the "capi" directory under which the now deprecated capifs was mounted and
created the capi tty device nodes.

This also changes the capi tty device names passed to udev to the capifs
layout which isn't mentioned in the specs.

Signed-off-by: Marc - Andre Dahlhaus <mad@wol.de>

--- a/drivers/isdn/capi/capi.c
+++ b/drivers/isdn/capi/capi.c
@@ -1363,7 +1363,7 @@ static int __init capinc_tty_init(void)
 	}
 	drv->owner = THIS_MODULE;
 	drv->driver_name = "capi_nc";
-	drv->name = "capi";
+	drv->name = "capi/";
 	drv->major = 0;
 	drv->minor_start = 0;
 	drv->type = TTY_DRIVER_TYPE_SERIAL;
@@ -1509,7 +1509,7 @@ static int __init capi_init(void)
 		return PTR_ERR(capi_class);
 	}
 
-	device_create(capi_class, NULL, MKDEV(capi_major, 0), NULL, "capi");
+	device_create(capi_class, NULL, MKDEV(capi_major, 0), NULL, "capi20");
 
 	if (capinc_tty_init() < 0) {
 		device_destroy(capi_class, MKDEV(capi_major, 0));


(Log in to post comments)


Copyright © 2010, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds