diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2011-04-07 16:13:01 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-04-19 14:39:28 -0700 |
commit | 6da9e95f7381fa27bc9c66c9840b11adde778618 (patch) | |
tree | 0d20778a69e7b14eecdea92bb222ba1e28ec36de /drivers/tty/vt/vt_ioctl.c | |
parent | 60680f97d7412b471d21ef42d4860657a0f9f2ed (diff) | |
download | blackbird-op-linux-6da9e95f7381fa27bc9c66c9840b11adde778618.tar.gz blackbird-op-linux-6da9e95f7381fa27bc9c66c9840b11adde778618.zip |
drivers/tty/vt/vt_ioctl.c: repair insane ?: expression
Cc: Arthur Taylor <art@ified.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/tty/vt/vt_ioctl.c')
-rw-r--r-- | drivers/tty/vt/vt_ioctl.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c index e71477a860c5..01ccd9e93b7f 100644 --- a/drivers/tty/vt/vt_ioctl.c +++ b/drivers/tty/vt/vt_ioctl.c @@ -698,11 +698,23 @@ int vt_ioctl(struct tty_struct *tty, break; case KDGKBMODE: - uival = ((kbd->kbdmode == VC_RAW) ? K_RAW : - (kbd->kbdmode == VC_MEDIUMRAW) ? K_MEDIUMRAW : - (kbd->kbdmode == VC_UNICODE) ? K_UNICODE : - (kbd->kbdmode == VC_OFF) ? K_OFF : - K_XLATE); + switch (kbd->kbdmode) { + case VC_RAW: + uival = K_RAW; + break; + case VC_MEDIUMRAW: + uival = K_MEDIUMRAW; + break; + case VC_UNICODE: + uival = K_UNICODE; + break; + case VC_OFF: + uival = K_OFF; + break; + default: + uival = K_XLATE; + break; + } goto setint; /* this could be folded into KDSKBMODE, but for compatibility |