diff options
author | Krzysztof Helt <krzysztof.h1@wp.pl> | 2009-07-07 13:15:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-08 12:19:49 -0400 |
commit | feaa61e49b126c2206051a234b8f14ccc75b9f61 (patch) | |
tree | f1b02b85d08b5b60a0278a6711a1ed1d14cd7c5c /drivers/video/atafb.c | |
parent | 0c8ddf7f8bf770cf49086af85078c4660d387c55 (diff) |
atafb: fix regression with uninitalized fb_info->mm_lock mutex
Remove redundant locking of the fb_info->mm_lock mutex before the
frambuffer is registered.
This fixes a problem with uninitialized the fb_info->mm_lock mutex
introduced by the commit 537a1bf059f " fbdev: add mutex for fb_mmap
locking"
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/atafb.c')
-rw-r--r-- | drivers/video/atafb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/video/atafb.c b/drivers/video/atafb.c index 497ff8af03ed..8cd279be74e5 100644 --- a/drivers/video/atafb.c +++ b/drivers/video/atafb.c | |||
@@ -2405,6 +2405,9 @@ static int do_fb_set_var(struct fb_var_screeninfo *var, int isactive) | |||
2405 | return 0; | 2405 | return 0; |
2406 | } | 2406 | } |
2407 | 2407 | ||
2408 | /* fbhw->encode_fix() must be called with fb_info->mm_lock held | ||
2409 | * if it is called after the register_framebuffer() - not a case here | ||
2410 | */ | ||
2408 | static int atafb_get_fix(struct fb_fix_screeninfo *fix, struct fb_info *info) | 2411 | static int atafb_get_fix(struct fb_fix_screeninfo *fix, struct fb_info *info) |
2409 | { | 2412 | { |
2410 | struct atafb_par par; | 2413 | struct atafb_par par; |
@@ -2414,9 +2417,7 @@ static int atafb_get_fix(struct fb_fix_screeninfo *fix, struct fb_info *info) | |||
2414 | if (err) | 2417 | if (err) |
2415 | return err; | 2418 | return err; |
2416 | memset(fix, 0, sizeof(struct fb_fix_screeninfo)); | 2419 | memset(fix, 0, sizeof(struct fb_fix_screeninfo)); |
2417 | mutex_lock(&info->mm_lock); | ||
2418 | err = fbhw->encode_fix(fix, &par); | 2420 | err = fbhw->encode_fix(fix, &par); |
2419 | mutex_unlock(&info->mm_lock); | ||
2420 | return err; | 2421 | return err; |
2421 | } | 2422 | } |
2422 | 2423 | ||