diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-07-05 11:25:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-06 17:02:50 -0400 |
commit | 4148df9b0f38bdd362dd91d52076926c11cbe5a9 (patch) | |
tree | a3f119761bbadfc37d0544420263f9272f5209c8 /drivers/video/fbsysfs.c | |
parent | 793285fcafce4719a05e0c99fa74b188157fe7fe (diff) |
fb: Initialize fb_info mutexes in framebuffer_alloc()
This way they'll be properly initialized early enough for users that may
touch them before the framebuffer has been registered.
Drivers that allocate their fb_info structure some other way (like
matrocfb's broken static allocation) need to be fixed up appropriately.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/fbsysfs.c')
-rw-r--r-- | drivers/video/fbsysfs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/fbsysfs.c b/drivers/video/fbsysfs.c index d4a2c11d9809..afc04df39a03 100644 --- a/drivers/video/fbsysfs.c +++ b/drivers/video/fbsysfs.c | |||
@@ -62,6 +62,9 @@ struct fb_info *framebuffer_alloc(size_t size, struct device *dev) | |||
62 | mutex_init(&info->bl_curve_mutex); | 62 | mutex_init(&info->bl_curve_mutex); |
63 | #endif | 63 | #endif |
64 | 64 | ||
65 | mutex_init(&info->lock); | ||
66 | mutex_init(&info->mm_lock); | ||
67 | |||
65 | return info; | 68 | return info; |
66 | #undef PADDING | 69 | #undef PADDING |
67 | #undef BYTES_PER_LONG | 70 | #undef BYTES_PER_LONG |