Revert "fb: Initialize fb_info mutexes in framebuffer_alloc()"

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Wednesday, July 8, 2009 - 9:59 am

Gitweb:     http://git.kernel.org/linus/6c96895e999f5c44a95a5cad6a6e32e7bd6e28b6
Commit:     6c96895e999f5c44a95a5cad6a6e32e7bd6e28b6
Parent:     99f5d48b98fb52db6da379c1b1fd6c87438ee45a
Author:     Linus Torvalds <torvalds@linux-foundation.org>
AuthorDate: Wed Jul 8 09:20:11 2009 -0700
Committer:  Linus Torvalds <torvalds@linux-foundation.org>
CommitDate: Wed Jul 8 09:20:11 2009 -0700

    Revert "fb: Initialize fb_info mutexes in framebuffer_alloc()"
    
    This reverts commit 4148df9b0f38bdd362dd91d52076926c11cbe5a9.
    
    Let's hope that the mm_lock initialization is now correct with all
    drivers, following Krzysztof's patches.
    
    Requested-by: Krzysztof Helt <krzysztof.h1@poczta.fm>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
 drivers/video/fbmem.c                |    2 ++
 drivers/video/fbsysfs.c              |    3 ---
 drivers/video/matrox/matroxfb_base.c |    1 -
 drivers/video/sm501fb.c              |    2 ++
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 53eb396..53ea056 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -1513,6 +1513,8 @@ register_framebuffer(struct fb_info *fb_info)
 		if (!registered_fb[i])
 			break;
 	fb_info->node = i;
+	mutex_init(&fb_info->lock);
+	mutex_init(&fb_info->mm_lock);
 
 	fb_info->dev = device_create(fb_class, fb_info->device,
 				     MKDEV(FB_MAJOR, i), NULL, "fb%d", i);
diff --git a/drivers/video/fbsysfs.c b/drivers/video/fbsysfs.c
index afc04df..d4a2c11 100644
--- a/drivers/video/fbsysfs.c
+++ b/drivers/video/fbsysfs.c
@@ -62,9 +62,6 @@ struct fb_info *framebuffer_alloc(size_t size, struct device *dev)
 	mutex_init(&info->bl_curve_mutex);
 #endif
 
-	mutex_init(&info->lock);
-	mutex_init(&info->mm_lock);
-
 	return info;
 #undef PADDING
 #undef BYTES_PER_LONG
diff --git a/drivers/video/matrox/matroxfb_base.c b/drivers/video/matrox/matroxfb_base.c
index 721a87d..0c1049b 100644
--- a/drivers/video/matrox/matroxfb_base.c
+++ b/drivers/video/matrox/matroxfb_base.c
@@ -2082,7 +2082,6 @@ static int matroxfb_probe(struct pci_dev* pdev, const struct pci_device_id* dumm
 	spin_lock_init(&ACCESS_FBINFO(lock.accel));
 	init_rwsem(&ACCESS_FBINFO(crtc2.lock));
 	init_rwsem(&ACCESS_FBINFO(altout.lock));
-	mutex_init(&ACCESS_FBINFO(fbcon).lock);
 	mutex_init(&ACCESS_FBINFO(fbcon).mm_lock);
 	ACCESS_FBINFO(irq_flags) = 0;
 	init_waitqueue_head(&ACCESS_FBINFO(crtc1.vsync.wait));
diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c
index 98f24f0..16d4f4c 100644
--- a/drivers/video/sm501fb.c
+++ b/drivers/video/sm501fb.c
@@ -1624,6 +1624,8 @@ static int __devinit sm501fb_start_one(struct sm501fb_info *info,
 	if (!fbi)
 		return 0;
 
+	mutex_init(&info->fb[head]->mm_lock);
+
 	ret = sm501fb_init_fb(info->fb[head], head, drvname);
 	if (ret) {
 		dev_err(info->dev, "cannot initialise fb %s\n", drvname);
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Revert "fb: Initialize fb_info mutexes in framebuffer_alloc()", Linux Kernel Mailing ..., (Wed Jul 8, 9:59 am)