X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fchar%2Fconsolemap.c;h=fd40b959afddd92c18a1924d74b24f14551df6b2;hb=02a93208edec0d655c9f18613d830dc6afeda7d4;hp=c85a4fa60da7e235b207a6ba84d305928ec1e142;hpb=c7c6e9494cc9a4a5b1a2ca870ed4531ad2b98a83;p=linux-2.6-omap-h63xx.git diff --git a/drivers/char/consolemap.c b/drivers/char/consolemap.c index c85a4fa60da..fd40b959afd 100644 --- a/drivers/char/consolemap.c +++ b/drivers/char/consolemap.c @@ -11,7 +11,6 @@ * Fix bug in inverse translation. Stanislav Voronyi , Dec 1998 */ -#include #include #include #include @@ -444,7 +443,7 @@ int con_clear_unimap(struct vc_data *vc, struct unimapinit *ui) p = (struct uni_pagedir *)*vc->vc_uni_pagedir_loc; if (p && p->readonly) return -EIO; if (!p || --p->refcount) { - q = (struct uni_pagedir *)kmalloc(sizeof(*p), GFP_KERNEL); + q = kmalloc(sizeof(*p), GFP_KERNEL); if (!q) { if (p) p->refcount++; return -ENOMEM; @@ -627,10 +626,10 @@ conv_uni_to_pc(struct vc_data *conp, long ucs) /* Only 16-bit codes supported at this time */ if (ucs > 0xffff) - ucs = 0xfffd; /* U+FFFD: REPLACEMENT CHARACTER */ - else if (ucs < 0x20 || ucs >= 0xfffe) + return -4; /* Not found */ + else if (ucs < 0x20) return -1; /* Not a printable character */ - else if (ucs == 0xfeff || (ucs >= 0x200a && ucs <= 0x200f)) + else if (ucs == 0xfeff || (ucs >= 0x200b && ucs <= 0x200f)) return -2; /* Zero-width space */ /* * UNI_DIRECT_BASE indicates the start of the region in the User Zone