vc_translate is used only in vt.c, so move the definition from a header there. Also, it used to be a macro, so be modern and make a static inline from it. This makes the code actually readable. And as a preparation for next patches, rename it to vc_translate_ascii. vc_translate will be a wrapper for both unicode and this one.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -74,8 +74,6 @@ int con_set_default_unimap(struct vc_data *vc); · 73 unmodified lines | |||
| 74 | void con_free_unimap(struct vc_data *vc); | 74 | void con_free_unimap(struct vc_data *vc); |
| 75 | int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc); | 75 | int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc); |
| 76 | 76 | ||
| 77 | #define vc_translate(vc, c) ((vc)->vc_translate[(c) | \ | ||
| 78 | ((vc)->vc_toggle_meta ? 0x80 : 0)]) | ||
| 79 | #else | 77 | #else |
| 80 | static inline int con_set_trans_old(unsigned char __user *table) | 78 | static inline int con_set_trans_old(unsigned char __user *table) |
| 81 | { | 79 | { |
| @@ -124,7 +122,6 @@ int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc) · 42 unmodified lines | |||
| 124 | return 0; | 122 | return 0; |
| 125 | } | 123 | } |
| 126 | 124 | ||
| 127 | #define vc_translate(vc, c) (c) | ||
| 128 | #endif | 125 | #endif |
| 129 | 126 | ||
| 130 | /* vt.c */ | 127 | /* vt.c */ |