diff options
Diffstat (limited to 'drivers/char/tty_io.c')
-rw-r--r-- | drivers/char/tty_io.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 05f443c47bbe..ea18a129b0b5 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c | |||
@@ -3070,11 +3070,22 @@ void __init console_init(void) | |||
3070 | } | 3070 | } |
3071 | } | 3071 | } |
3072 | 3072 | ||
3073 | static char *tty_devnode(struct device *dev, mode_t *mode) | ||
3074 | { | ||
3075 | if (!mode) | ||
3076 | return NULL; | ||
3077 | if (dev->devt == MKDEV(TTYAUX_MAJOR, 0) || | ||
3078 | dev->devt == MKDEV(TTYAUX_MAJOR, 2)) | ||
3079 | *mode = 0666; | ||
3080 | return NULL; | ||
3081 | } | ||
3082 | |||
3073 | static int __init tty_class_init(void) | 3083 | static int __init tty_class_init(void) |
3074 | { | 3084 | { |
3075 | tty_class = class_create(THIS_MODULE, "tty"); | 3085 | tty_class = class_create(THIS_MODULE, "tty"); |
3076 | if (IS_ERR(tty_class)) | 3086 | if (IS_ERR(tty_class)) |
3077 | return PTR_ERR(tty_class); | 3087 | return PTR_ERR(tty_class); |
3088 | tty_class->devnode = tty_devnode; | ||
3078 | return 0; | 3089 | return 0; |
3079 | } | 3090 | } |
3080 | 3091 | ||