tty: use for_each_console() and WARN() on sysfs failures

This fixes the build warnings in the tty code, and uses the proper
function for iterating over the console devices.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Kay Sievers
2011-01-09 16:39:14 +01:00
committed by Greg Kroah-Hartman
parent c55c63c653
commit a2a6a822ad
2 changed files with 3 additions and 3 deletions

View File

@@ -2994,7 +2994,7 @@ int __init vty_init(const struct file_operations *console_fops)
if (IS_ERR(tty0dev))
tty0dev = NULL;
else
device_create_file(tty0dev, &dev_attr_active);
WARN_ON(device_create_file(tty0dev, &dev_attr_active) < 0);
vcs_init();