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 a3afa0c387cd..c70d9dabefae 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c | |||
@@ -3056,11 +3056,22 @@ void __init console_init(void) | |||
3056 | } | 3056 | } |
3057 | } | 3057 | } |
3058 | 3058 | ||
3059 | static char *tty_devnode(struct device *dev, mode_t *mode) | ||
3060 | { | ||
3061 | if (!mode) | ||
3062 | return NULL; | ||
3063 | if (dev->devt == MKDEV(TTYAUX_MAJOR, 0) || | ||
3064 | dev->devt == MKDEV(TTYAUX_MAJOR, 2)) | ||
3065 | *mode = 0666; | ||
3066 | return NULL; | ||
3067 | } | ||
3068 | |||
3059 | static int __init tty_class_init(void) | 3069 | static int __init tty_class_init(void) |
3060 | { | 3070 | { |
3061 | tty_class = class_create(THIS_MODULE, "tty"); | 3071 | tty_class = class_create(THIS_MODULE, "tty"); |
3062 | if (IS_ERR(tty_class)) | 3072 | if (IS_ERR(tty_class)) |
3063 | return PTR_ERR(tty_class); | 3073 | return PTR_ERR(tty_class); |
3074 | tty_class->devnode = tty_devnode; | ||
3064 | return 0; | 3075 | return 0; |
3065 | } | 3076 | } |
3066 | 3077 | ||