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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user