diff options
Diffstat (limited to 'drivers/video/fbmem.c')
-rw-r--r-- | drivers/video/fbmem.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 2222de6ad844..d2e19f6dd72c 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c | |||
@@ -80,10 +80,12 @@ EXPORT_SYMBOL(fb_get_color_depth); | |||
80 | */ | 80 | */ |
81 | void fb_pad_aligned_buffer(u8 *dst, u32 d_pitch, u8 *src, u32 s_pitch, u32 height) | 81 | void fb_pad_aligned_buffer(u8 *dst, u32 d_pitch, u8 *src, u32 s_pitch, u32 height) |
82 | { | 82 | { |
83 | int i; | 83 | int i, j; |
84 | 84 | ||
85 | for (i = height; i--; ) { | 85 | for (i = height; i--; ) { |
86 | memcpy(dst, src, s_pitch); | 86 | /* s_pitch is a few bytes at the most, memcpy is suboptimal */ |
87 | for (j = 0; j < s_pitch; j++) | ||
88 | dst[j] = src[j]; | ||
87 | src += s_pitch; | 89 | src += s_pitch; |
88 | dst += d_pitch; | 90 | dst += d_pitch; |
89 | } | 91 | } |
@@ -1164,6 +1166,7 @@ static void __exit | |||
1164 | fbmem_exit(void) | 1166 | fbmem_exit(void) |
1165 | { | 1167 | { |
1166 | class_destroy(fb_class); | 1168 | class_destroy(fb_class); |
1169 | unregister_chrdev(FB_MAJOR, "fb"); | ||
1167 | } | 1170 | } |
1168 | 1171 | ||
1169 | module_exit(fbmem_exit); | 1172 | module_exit(fbmem_exit); |