diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2011-04-07 19:13:01 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-04-19 17:39:28 -0400 |
commit | 6da9e95f7381fa27bc9c66c9840b11adde778618 (patch) | |
tree | 0d20778a69e7b14eecdea92bb222ba1e28ec36de | |
parent | 60680f97d7412b471d21ef42d4860657a0f9f2ed (diff) |
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>
-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, | |||
698 | break; | 698 | break; |
699 | 699 | ||
700 | case KDGKBMODE: | 700 | case KDGKBMODE: |
701 | uival = ((kbd->kbdmode == VC_RAW) ? K_RAW : | 701 | switch (kbd->kbdmode) { |
702 | (kbd->kbdmode == VC_MEDIUMRAW) ? K_MEDIUMRAW : | 702 | case VC_RAW: |
703 | (kbd->kbdmode == VC_UNICODE) ? K_UNICODE : | 703 | uival = K_RAW; |
704 | (kbd->kbdmode == VC_OFF) ? K_OFF : | 704 | break; |
705 | K_XLATE); | 705 | case VC_MEDIUMRAW: |
706 | uival = K_MEDIUMRAW; | ||
707 | break; | ||
708 | case VC_UNICODE: | ||
709 | uival = K_UNICODE; | ||
710 | break; | ||
711 | case VC_OFF: | ||
712 | uival = K_OFF; | ||
713 | break; | ||
714 | default: | ||
715 | uival = K_XLATE; | ||
716 | break; | ||
717 | } | ||
706 | goto setint; | 718 | goto setint; |
707 | 719 | ||
708 | /* this could be folded into KDSKBMODE, but for compatibility | 720 | /* this could be folded into KDSKBMODE, but for compatibility |