aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-01-24 19:28:18 -0500
committerDave Airlie <airlied@redhat.com>2013-02-07 21:02:41 -0500
commite93a9a868792ad71cdd09d75e5a02d8067473c4e (patch)
treed2affabcd5a7e48a77ca148c9dc9be4f23de9936 /drivers/video
parent50e244cc793d511b86adea24972f3a7264cae114 (diff)
fb: Yet another band-aid for fixing lockdep mess
I've still got lockdep warnings even after Alan's patch, and it seems that yet more band aids are required to paper over similar paths for unbind_con_driver() and unregister_con_driver(). After this hack, lockdep warnings are finally gone. Signed-off-by: Takashi Iwai <tiwai@suse.de> Cc: Alan Cox <alan@linux.intel.com> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Jiri Kosina <jkosina@suse.cz> Cc: stable <stable@vger.kernel.org> Tested-by: Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/console/fbcon.c4
-rw-r--r--drivers/video/fbmem.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 4bd7820cf4d0..2aef9cac4d18 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -3004,7 +3004,7 @@ static int fbcon_unbind(void)
3004{ 3004{
3005 int ret; 3005 int ret;
3006 3006
3007 ret = unbind_con_driver(&fb_con, first_fb_vc, last_fb_vc, 3007 ret = do_unbind_con_driver(&fb_con, first_fb_vc, last_fb_vc,
3008 fbcon_is_default); 3008 fbcon_is_default);
3009 3009
3010 if (!ret) 3010 if (!ret)
@@ -3077,7 +3077,7 @@ static int fbcon_fb_unregistered(struct fb_info *info)
3077 primary_device = -1; 3077 primary_device = -1;
3078 3078
3079 if (!num_registered_fb) 3079 if (!num_registered_fb)
3080 unregister_con_driver(&fb_con); 3080 do_unregister_con_driver(&fb_con);
3081 3081
3082 return 0; 3082 return 0;
3083} 3083}
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index d8d9831b3fdb..070b9a13d892 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -1668,8 +1668,10 @@ static int do_unregister_framebuffer(struct fb_info *fb_info)
1668 1668
1669 if (!lock_fb_info(fb_info)) 1669 if (!lock_fb_info(fb_info))
1670 return -ENODEV; 1670 return -ENODEV;
1671 console_lock();
1671 event.info = fb_info; 1672 event.info = fb_info;
1672 ret = fb_notifier_call_chain(FB_EVENT_FB_UNBIND, &event); 1673 ret = fb_notifier_call_chain(FB_EVENT_FB_UNBIND, &event);
1674 console_unlock();
1673 unlock_fb_info(fb_info); 1675 unlock_fb_info(fb_info);
1674 1676
1675 if (ret) 1677 if (ret)
@@ -1684,7 +1686,9 @@ static int do_unregister_framebuffer(struct fb_info *fb_info)
1684 num_registered_fb--; 1686 num_registered_fb--;
1685 fb_cleanup_device(fb_info); 1687 fb_cleanup_device(fb_info);
1686 event.info = fb_info; 1688 event.info = fb_info;
1689 console_lock();
1687 fb_notifier_call_chain(FB_EVENT_FB_UNREGISTERED, &event); 1690 fb_notifier_call_chain(FB_EVENT_FB_UNREGISTERED, &event);
1691 console_unlock();
1688 1692
1689 /* this may free fb info */ 1693 /* this may free fb info */
1690 put_fb_info(fb_info); 1694 put_fb_info(fb_info);