2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-24 05:04:00 +08:00

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>
This commit is contained in:
Takashi Iwai 2014-05-13 12:09:29 +02:00 committed by Greg Kroah-Hartman
parent e4bdab70dd
commit 91727b16d5

View File

@ -179,7 +179,6 @@ struct uni_pagedir {
unsigned long sum; unsigned long sum;
unsigned char *inverse_translations[4]; unsigned char *inverse_translations[4];
u16 *inverse_trans_unicode; u16 *inverse_trans_unicode;
int readonly;
}; };
static struct uni_pagedir *dflt; static struct uni_pagedir *dflt;
@ -501,9 +500,6 @@ static int con_do_clear_unimap(struct vc_data *vc, struct unimapinit *ui)
struct uni_pagedir *p, *q; struct uni_pagedir *p, *q;
p = *vc->vc_uni_pagedir_loc; p = *vc->vc_uni_pagedir_loc;
if (p && p->readonly)
return -EIO;
if (!p || --p->refcount) { if (!p || --p->refcount) {
q = kzalloc(sizeof(*p), GFP_KERNEL); q = kzalloc(sizeof(*p), GFP_KERNEL);
if (!q) { if (!q) {
@ -536,19 +532,13 @@ int con_set_unimap(struct vc_data *vc, ushort ct, struct unipair __user *list)
int err = 0, err1, i; int err = 0, err1, i;
struct uni_pagedir *p, *q; struct uni_pagedir *p, *q;
if (!ct)
return 0;
console_lock(); console_lock();
/* Save original vc_unipagdir_loc in case we allocate a new one */ /* Save original vc_unipagdir_loc in case we allocate a new one */
p = *vc->vc_uni_pagedir_loc; p = *vc->vc_uni_pagedir_loc;
if (p->readonly) {
console_unlock();
return -EIO;
}
if (!ct) {
console_unlock();
return 0;
}
if (p->refcount > 1) { if (p->refcount > 1) {
int j, k; int j, k;