diff options
Diffstat (limited to 'drivers/video/console/fbcon_rotate.h')
-rw-r--r-- | drivers/video/console/fbcon_rotate.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/console/fbcon_rotate.h b/drivers/video/console/fbcon_rotate.h index 90c672096c2e..e504fbf5c604 100644 --- a/drivers/video/console/fbcon_rotate.h +++ b/drivers/video/console/fbcon_rotate.h | |||
@@ -49,7 +49,7 @@ static inline void pattern_set_bit(u32 x, u32 y, u32 pitch, char *pat) | |||
49 | static inline void rotate_ud(const char *in, char *out, u32 width, u32 height) | 49 | static inline void rotate_ud(const char *in, char *out, u32 width, u32 height) |
50 | { | 50 | { |
51 | int i, j; | 51 | int i, j; |
52 | int shift = width % 8; | 52 | int shift = (8 - (width % 8)) & 7; |
53 | 53 | ||
54 | width = (width + 7) & ~7; | 54 | width = (width + 7) & ~7; |
55 | 55 | ||
@@ -85,7 +85,7 @@ static inline void rotate_cw(const char *in, char *out, u32 width, u32 height) | |||
85 | static inline void rotate_ccw(const char *in, char *out, u32 width, u32 height) | 85 | static inline void rotate_ccw(const char *in, char *out, u32 width, u32 height) |
86 | { | 86 | { |
87 | int i, j, h = height, w = width; | 87 | int i, j, h = height, w = width; |
88 | int shift = width % 8; | 88 | int shift = (8 - (width % 8)) & 7; |
89 | 89 | ||
90 | width = (width + 7) & ~7; | 90 | width = (width + 7) & ~7; |
91 | height = (height + 7) & ~7; | 91 | height = (height + 7) & ~7; |