mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
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 537a1bf059
" 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>
This commit is contained in:
parent
0c8ddf7f8b
commit
feaa61e49b
1 changed files with 3 additions and 2 deletions
|
@ -2405,6 +2405,9 @@ static int do_fb_set_var(struct fb_var_screeninfo *var, int isactive)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* fbhw->encode_fix() must be called with fb_info->mm_lock held
|
||||||
|
* if it is called after the register_framebuffer() - not a case here
|
||||||
|
*/
|
||||||
static int atafb_get_fix(struct fb_fix_screeninfo *fix, struct fb_info *info)
|
static int atafb_get_fix(struct fb_fix_screeninfo *fix, struct fb_info *info)
|
||||||
{
|
{
|
||||||
struct atafb_par par;
|
struct atafb_par par;
|
||||||
|
@ -2414,9 +2417,7 @@ static int atafb_get_fix(struct fb_fix_screeninfo *fix, struct fb_info *info)
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
memset(fix, 0, sizeof(struct fb_fix_screeninfo));
|
memset(fix, 0, sizeof(struct fb_fix_screeninfo));
|
||||||
mutex_lock(&info->mm_lock);
|
|
||||||
err = fbhw->encode_fix(fix, &par);
|
err = fbhw->encode_fix(fix, &par);
|
||||||
mutex_unlock(&info->mm_lock);
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue