X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=drivers%2Fchar%2Fvc_screen.c;h=eebfad2777d29ac9bfd7134eab259c11c7bd5a79;hb=814dae031d08d40d34c0403a54d6e659baf0ae71;hp=83aeedda200cfccc6724be4eaf8ce3c715b1c2d7;hpb=6ec129c3a2f8b38bc37e42348470ccfcb7460146;p=linux-2.6-omap-h63xx.git diff --git a/drivers/char/vc_screen.c b/drivers/char/vc_screen.c index 83aeedda200..eebfad2777d 100644 --- a/drivers/char/vc_screen.c +++ b/drivers/char/vc_screen.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -460,9 +461,13 @@ static int vcs_open(struct inode *inode, struct file *filp) { unsigned int currcons = iminor(inode) & 127; + int ret = 0; + + lock_kernel(); if(currcons && !vc_cons_allocated(currcons-1)) - return -ENXIO; - return 0; + ret = -ENXIO; + unlock_kernel(); + return ret; } static const struct file_operations vcs_fops = {