lkml.org 
[lkml]   [2004]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] Add sysfs class support for CAPI
From
Date
Hi Greg,

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"

Regards

Marcel

===== drivers/isdn/capi/capi.c 1.52 vs edited =====
--- 1.52/drivers/isdn/capi/capi.c Sat Apr 10 22:04:37 2004
+++ edited/drivers/isdn/capi/capi.c Sat Apr 10 22:06:20 2004
@@ -1316,7 +1316,8 @@

drv->owner = THIS_MODULE;
drv->driver_name = "capi_nc";
- drv->name = "capi/";
+ drv->devfs_name = "capi/";
+ drv->name = "capi";
drv->major = capi_ttymajor;
drv->minor_start = 0;
drv->type = TTY_DRIVER_TYPE_SERIAL;
@@ -1492,7 +1493,7 @@
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,
"isdn/capi20");
\
 
 \ /
  Last update: 2005-03-22 14:02    [W:1.512 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site