@@ -9,7 +9,7 @@ config CAPI_TRACE
If unsure, say Y.
config ISDN_CAPI_CAPI20
- tristate "CAPI2.0 /dev/capi support"
+ tristate "CAPI2.0 /dev/capi20 support"
help
This option will provide the CAPI 2.0 interface to userspace
applications via /dev/capi20. Applications should use the
@@ -1250,6 +1250,11 @@ static const struct tty_operations capinc_ops = {
.cleanup = capinc_tty_cleanup,
};
+static char *capi_devnode(struct device *dev, umode_t *mode)
+{
+ return kasprintf(GFP_KERNEL, "capi/%u", MINOR(dev->devt));
+}
+
static int __init capinc_tty_init(void)
{
struct tty_driver *drv;
@@ -1272,6 +1277,7 @@ static int __init capinc_tty_init(void)
}
drv->driver_name = "capi_nc";
drv->name = "capi";
+ drv->devnode = capi_devnode;
drv->major = 0;
drv->minor_start = 0;
drv->type = TTY_DRIVER_TYPE_SERIAL;
@@ -1417,7 +1423,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));