Commit 53387be8 authored by Marcel Holtmann's avatar Marcel Holtmann Committed by Greg Kroah-Hartman

[PATCH] Fix sysfs class support for CAPI

this patch fixes a bug in the CAPI TTY support, because the ->name value
of the TTY driver shouldn't contain a "/". After changing this there are
now a "capi20" TTY device and a "capi20" control device and so I renamed
the control device to "capi". The userspace visible part must be done by
udev and I added these two rules to restore the old namespace:

	# CAPI devices
	KERNEL="capi",          NAME="capi20", SYMLINK="isdn/capi20"
	KERNEL="capi*",         NAME="capi/%n"
parent 145f1f3a
...@@ -1312,7 +1312,8 @@ static int capinc_tty_init(void) ...@@ -1312,7 +1312,8 @@ static int capinc_tty_init(void)
drv->owner = THIS_MODULE; drv->owner = THIS_MODULE;
drv->driver_name = "capi_nc"; drv->driver_name = "capi_nc";
drv->name = "capi/"; drv->devfs_name = "capi/";
drv->name = "capi";
drv->major = capi_ttymajor; drv->major = capi_ttymajor;
drv->minor_start = 0; drv->minor_start = 0;
drv->type = TTY_DRIVER_TYPE_SERIAL; drv->type = TTY_DRIVER_TYPE_SERIAL;
...@@ -1488,7 +1489,7 @@ static int __init capi_init(void) ...@@ -1488,7 +1489,7 @@ static int __init capi_init(void)
return PTR_ERR(capi_class); return PTR_ERR(capi_class);
} }
class_simple_device_add(capi_class, MKDEV(capi_major, 0), NULL, "capi20"); class_simple_device_add(capi_class, MKDEV(capi_major, 0), NULL, "capi");
devfs_mk_cdev(MKDEV(capi_major, 0), S_IFCHR | S_IRUSR | S_IWUSR, devfs_mk_cdev(MKDEV(capi_major, 0), S_IFCHR | S_IRUSR | S_IWUSR,
"isdn/capi20"); "isdn/capi20");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment