|
@@ -262,7 +262,7 @@ u16 inverse_translate(struct vc_data *conp, int glyph, int use_unicode)
|
|
|
int m;
|
|
|
if (glyph < 0 || glyph >= MAX_GLYPH)
|
|
|
return 0;
|
|
|
- else if (!(p = (struct uni_pagedir *)*conp->vc_uni_pagedir_loc))
|
|
|
+ else if (!(p = *conp->vc_uni_pagedir_loc))
|
|
|
return glyph;
|
|
|
else if (use_unicode) {
|
|
|
if (!p->inverse_trans_unicode)
|
|
@@ -287,7 +287,7 @@ static void update_user_maps(void)
|
|
|
for (i = 0; i < MAX_NR_CONSOLES; i++) {
|
|
|
if (!vc_cons_allocated(i))
|
|
|
continue;
|
|
|
- p = (struct uni_pagedir *)*vc_cons[i].d->vc_uni_pagedir_loc;
|
|
|
+ p = *vc_cons[i].d->vc_uni_pagedir_loc;
|
|
|
if (p && p != q) {
|
|
|
set_inverse_transl(vc_cons[i].d, p, USER_MAP);
|
|
|
set_inverse_trans_unicode(vc_cons[i].d, p);
|
|
@@ -418,10 +418,10 @@ void con_free_unimap(struct vc_data *vc)
|
|
|
{
|
|
|
struct uni_pagedir *p;
|
|
|
|
|
|
- p = (struct uni_pagedir *)*vc->vc_uni_pagedir_loc;
|
|
|
+ p = *vc->vc_uni_pagedir_loc;
|
|
|
if (!p)
|
|
|
return;
|
|
|
- *vc->vc_uni_pagedir_loc = 0;
|
|
|
+ *vc->vc_uni_pagedir_loc = NULL;
|
|
|
if (--p->refcount)
|
|
|
return;
|
|
|
con_release_unimap(p);
|
|
@@ -436,7 +436,7 @@ static int con_unify_unimap(struct vc_data *conp, struct uni_pagedir *p)
|
|
|
for (i = 0; i < MAX_NR_CONSOLES; i++) {
|
|
|
if (!vc_cons_allocated(i))
|
|
|
continue;
|
|
|
- q = (struct uni_pagedir *)*vc_cons[i].d->vc_uni_pagedir_loc;
|
|
|
+ q = *vc_cons[i].d->vc_uni_pagedir_loc;
|
|
|
if (!q || q == p || q->sum != p->sum)
|
|
|
continue;
|
|
|
for (j = 0; j < 32; j++) {
|
|
@@ -459,7 +459,7 @@ static int con_unify_unimap(struct vc_data *conp, struct uni_pagedir *p)
|
|
|
}
|
|
|
if (j == 32) {
|
|
|
q->refcount++;
|
|
|
- *conp->vc_uni_pagedir_loc = (unsigned long)q;
|
|
|
+ *conp->vc_uni_pagedir_loc = q;
|
|
|
con_release_unimap(p);
|
|
|
kfree(p);
|
|
|
return 1;
|
|
@@ -500,7 +500,7 @@ static int con_do_clear_unimap(struct vc_data *vc, struct unimapinit *ui)
|
|
|
{
|
|
|
struct uni_pagedir *p, *q;
|
|
|
|
|
|
- p = (struct uni_pagedir *)*vc->vc_uni_pagedir_loc;
|
|
|
+ p = *vc->vc_uni_pagedir_loc;
|
|
|
if (p && p->readonly)
|
|
|
return -EIO;
|
|
|
|
|
@@ -512,7 +512,7 @@ static int con_do_clear_unimap(struct vc_data *vc, struct unimapinit *ui)
|
|
|
return -ENOMEM;
|
|
|
}
|
|
|
q->refcount=1;
|
|
|
- *vc->vc_uni_pagedir_loc = (unsigned long)q;
|
|
|
+ *vc->vc_uni_pagedir_loc = q;
|
|
|
} else {
|
|
|
if (p == dflt) dflt = NULL;
|
|
|
p->refcount++;
|
|
@@ -539,7 +539,7 @@ int con_set_unimap(struct vc_data *vc, ushort ct, struct unipair __user *list)
|
|
|
console_lock();
|
|
|
|
|
|
/* Save original vc_unipagdir_loc in case we allocate a new one */
|
|
|
- p = (struct uni_pagedir *)*vc->vc_uni_pagedir_loc;
|
|
|
+ p = *vc->vc_uni_pagedir_loc;
|
|
|
if (p->readonly) {
|
|
|
console_unlock();
|
|
|
return -EIO;
|
|
@@ -564,7 +564,7 @@ int con_set_unimap(struct vc_data *vc, ushort ct, struct unipair __user *list)
|
|
|
* Since refcount was > 1, con_clear_unimap() allocated a
|
|
|
* a new uni_pagedir for this vc. Re: p != q
|
|
|
*/
|
|
|
- q = (struct uni_pagedir *)*vc->vc_uni_pagedir_loc;
|
|
|
+ q = *vc->vc_uni_pagedir_loc;
|
|
|
|
|
|
/*
|
|
|
* uni_pgdir is a 32*32*64 table with rows allocated
|
|
@@ -586,7 +586,7 @@ int con_set_unimap(struct vc_data *vc, ushort ct, struct unipair __user *list)
|
|
|
err1 = con_insert_unipair(q, l, p2[k]);
|
|
|
if (err1) {
|
|
|
p->refcount++;
|
|
|
- *vc->vc_uni_pagedir_loc = (unsigned long)p;
|
|
|
+ *vc->vc_uni_pagedir_loc = p;
|
|
|
con_release_unimap(q);
|
|
|
kfree(q);
|
|
|
console_unlock();
|
|
@@ -655,12 +655,12 @@ int con_set_default_unimap(struct vc_data *vc)
|
|
|
struct uni_pagedir *p;
|
|
|
|
|
|
if (dflt) {
|
|
|
- p = (struct uni_pagedir *)*vc->vc_uni_pagedir_loc;
|
|
|
+ p = *vc->vc_uni_pagedir_loc;
|
|
|
if (p == dflt)
|
|
|
return 0;
|
|
|
|
|
|
dflt->refcount++;
|
|
|
- *vc->vc_uni_pagedir_loc = (unsigned long)dflt;
|
|
|
+ *vc->vc_uni_pagedir_loc = dflt;
|
|
|
if (p && !--p->refcount) {
|
|
|
con_release_unimap(p);
|
|
|
kfree(p);
|
|
@@ -674,7 +674,7 @@ int con_set_default_unimap(struct vc_data *vc)
|
|
|
if (err)
|
|
|
return err;
|
|
|
|
|
|
- p = (struct uni_pagedir *)*vc->vc_uni_pagedir_loc;
|
|
|
+ p = *vc->vc_uni_pagedir_loc;
|
|
|
q = dfont_unitable;
|
|
|
|
|
|
for (i = 0; i < 256; i++)
|
|
@@ -685,7 +685,7 @@ int con_set_default_unimap(struct vc_data *vc)
|
|
|
}
|
|
|
|
|
|
if (con_unify_unimap(vc, p)) {
|
|
|
- dflt = (struct uni_pagedir *)*vc->vc_uni_pagedir_loc;
|
|
|
+ dflt = *vc->vc_uni_pagedir_loc;
|
|
|
return err;
|
|
|
}
|
|
|
|
|
@@ -713,9 +713,9 @@ int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc)
|
|
|
if (*dst_vc->vc_uni_pagedir_loc == *src_vc->vc_uni_pagedir_loc)
|
|
|
return 0;
|
|
|
con_free_unimap(dst_vc);
|
|
|
- q = (struct uni_pagedir *)*src_vc->vc_uni_pagedir_loc;
|
|
|
+ q = *src_vc->vc_uni_pagedir_loc;
|
|
|
q->refcount++;
|
|
|
- *dst_vc->vc_uni_pagedir_loc = (long)q;
|
|
|
+ *dst_vc->vc_uni_pagedir_loc = q;
|
|
|
return 0;
|
|
|
}
|
|
|
EXPORT_SYMBOL(con_copy_unimap);
|
|
@@ -737,7 +737,7 @@ int con_get_unimap(struct vc_data *vc, ushort ct, ushort __user *uct, struct uni
|
|
|
|
|
|
ect = 0;
|
|
|
if (*vc->vc_uni_pagedir_loc) {
|
|
|
- p = (struct uni_pagedir *)*vc->vc_uni_pagedir_loc;
|
|
|
+ p = *vc->vc_uni_pagedir_loc;
|
|
|
for (i = 0; i < 32; i++)
|
|
|
if ((p1 = p->uni_pgdir[i]))
|
|
|
for (j = 0; j < 32; j++)
|
|
@@ -810,7 +810,7 @@ conv_uni_to_pc(struct vc_data *conp, long ucs)
|
|
|
if (!*conp->vc_uni_pagedir_loc)
|
|
|
return -3;
|
|
|
|
|
|
- p = (struct uni_pagedir *)*conp->vc_uni_pagedir_loc;
|
|
|
+ p = *conp->vc_uni_pagedir_loc;
|
|
|
if ((p1 = p->uni_pgdir[ucs >> 11]) &&
|
|
|
(p2 = p1[(ucs >> 6) & 0x1f]) &&
|
|
|
(h = p2[ucs & 0x3f]) < MAX_GLYPH)
|