diff options
author | Dave Jones <davej@redhat.com> | 2006-10-03 04:14:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-03 11:04:10 -0400 |
commit | e299dd4d7c5f38a24045e0578049d872b62f21eb (patch) | |
tree | d8ab3a71e434a9137feb4aeddf5c59f58c8ae591 /drivers/video/console/fbcon.c | |
parent | 7a45093b7caa9d3d5421274b4ba80fba5da17e19 (diff) |
[PATCH] fbcon: Use persistent allocation for cursor blinking
Every time the console cursor blinks, we do a kmalloc/kfree pair. This
patch turns that into a single allocation.
This allocation was the most frequent kmalloc I saw on my test box.
[adaplas]
Per Alan's suggestion, move global variables to fbcon's private structure.
This would also avoid resource leaks when fbcon is unloaded.
Signed-off-by: Dave Jones <davej@redhat.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/console/fbcon.c')
-rw-r--r-- | drivers/video/console/fbcon.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 1b4f75d1f8a9..050856e09e87 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c | |||
@@ -3225,7 +3225,10 @@ static void fbcon_exit(void) | |||
3225 | module_put(info->fbops->owner); | 3225 | module_put(info->fbops->owner); |
3226 | 3226 | ||
3227 | if (info->fbcon_par) { | 3227 | if (info->fbcon_par) { |
3228 | struct fbcon_ops *ops = info->fbcon_par; | ||
3229 | |||
3228 | fbcon_del_cursor_timer(info); | 3230 | fbcon_del_cursor_timer(info); |
3231 | kfree(ops->cursor_src); | ||
3229 | kfree(info->fbcon_par); | 3232 | kfree(info->fbcon_par); |
3230 | info->fbcon_par = NULL; | 3233 | info->fbcon_par = NULL; |
3231 | } | 3234 | } |