diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-05-13 06:09:29 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-28 16:37:21 -0400 |
commit | 91727b16d571155286cae941f35c752287ec49cf (patch) | |
tree | 8759b3621a6c59aa9b0d63a02ef301ab71f1c7e5 | |
parent | e4bdab70dd07d8648a1ec3e029239aa86eb836b6 (diff) |
console: Remove superfluous readonly check
uni_pagedir.readonly is never set. Let's get rid of superfluous check
codes.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/vt/consolemap.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/drivers/tty/vt/consolemap.c b/drivers/tty/vt/consolemap.c index 3fdc786b6b2f..610b720d3b91 100644 --- a/drivers/tty/vt/consolemap.c +++ b/drivers/tty/vt/consolemap.c | |||
@@ -179,7 +179,6 @@ struct uni_pagedir { | |||
179 | unsigned long sum; | 179 | unsigned long sum; |
180 | unsigned char *inverse_translations[4]; | 180 | unsigned char *inverse_translations[4]; |
181 | u16 *inverse_trans_unicode; | 181 | u16 *inverse_trans_unicode; |
182 | int readonly; | ||
183 | }; | 182 | }; |
184 | 183 | ||
185 | static struct uni_pagedir *dflt; | 184 | static struct uni_pagedir *dflt; |
@@ -501,9 +500,6 @@ static int con_do_clear_unimap(struct vc_data *vc, struct unimapinit *ui) | |||
501 | struct uni_pagedir *p, *q; | 500 | struct uni_pagedir *p, *q; |
502 | 501 | ||
503 | p = *vc->vc_uni_pagedir_loc; | 502 | p = *vc->vc_uni_pagedir_loc; |
504 | if (p && p->readonly) | ||
505 | return -EIO; | ||
506 | |||
507 | if (!p || --p->refcount) { | 503 | if (!p || --p->refcount) { |
508 | q = kzalloc(sizeof(*p), GFP_KERNEL); | 504 | q = kzalloc(sizeof(*p), GFP_KERNEL); |
509 | if (!q) { | 505 | if (!q) { |
@@ -536,19 +532,13 @@ int con_set_unimap(struct vc_data *vc, ushort ct, struct unipair __user *list) | |||
536 | int err = 0, err1, i; | 532 | int err = 0, err1, i; |
537 | struct uni_pagedir *p, *q; | 533 | struct uni_pagedir *p, *q; |
538 | 534 | ||
535 | if (!ct) | ||
536 | return 0; | ||
537 | |||
539 | console_lock(); | 538 | console_lock(); |
540 | 539 | ||
541 | /* Save original vc_unipagdir_loc in case we allocate a new one */ | 540 | /* Save original vc_unipagdir_loc in case we allocate a new one */ |
542 | p = *vc->vc_uni_pagedir_loc; | 541 | p = *vc->vc_uni_pagedir_loc; |
543 | if (p->readonly) { | ||
544 | console_unlock(); | ||
545 | return -EIO; | ||
546 | } | ||
547 | |||
548 | if (!ct) { | ||
549 | console_unlock(); | ||
550 | return 0; | ||
551 | } | ||
552 | 542 | ||
553 | if (p->refcount > 1) { | 543 | if (p->refcount > 1) { |
554 | int j, k; | 544 | int j, k; |