summaryrefslogtreecommitdiffstats
path: root/drivers/char/tty_io.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-20 15:55:39 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-20 15:55:39 -0700
commita57c21c7159e07c27e317ea3513dfb382be3f153 (patch)
treed70427d2d2f44b9d973aa21e7eef93f30f17515d /drivers/char/tty_io.c
parente11c675ede0d42a405ae595528bf0b29ce1ae56f (diff)
parente454cea20bdcff10ee698d11b8882662a0153a47 (diff)
downloadop-kernel-dev-a57c21c7159e07c27e317ea3513dfb382be3f153.zip
op-kernel-dev-a57c21c7159e07c27e317ea3513dfb382be3f153.tar.gz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: Driver-Core: extend devnode callbacks to provide permissions
Diffstat (limited to 'drivers/char/tty_io.c')
-rw-r--r--drivers/char/tty_io.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index 05f443c..ea18a12 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -3070,11 +3070,22 @@ void __init console_init(void)
}
}
+static char *tty_devnode(struct device *dev, mode_t *mode)
+{
+ if (!mode)
+ return NULL;
+ if (dev->devt == MKDEV(TTYAUX_MAJOR, 0) ||
+ dev->devt == MKDEV(TTYAUX_MAJOR, 2))
+ *mode = 0666;
+ return NULL;
+}
+
static int __init tty_class_init(void)
{
tty_class = class_create(THIS_MODULE, "tty");
if (IS_ERR(tty_class))
return PTR_ERR(tty_class);
+ tty_class->devnode = tty_devnode;
return 0;
}
OpenPOWER on IntegriCloud