linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm: build error when magic sysrq isn't enabled
@ 2010-03-31  4:18 Changli Gao
  0 siblings, 0 replies; only message in thread
From: Changli Gao @ 2010-03-31  4:18 UTC (permalink / raw)
  To: linux-next; +Cc: xiaosuo

drm build error when magic sysrq isn't enabled

sysrq_drm_fb_helper_restore_op is only valid when magic sysrq is
enabled, but it is used whenever magic sysrq is enabled or not.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
----
drivers/gpu/drm/drm_fb_helper.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 85cdf05..0e5b4f6 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -913,7 +913,9 @@ int drm_fb_helper_single_fb_probe(struct drm_device *dev,
 		printk(KERN_INFO "registered panic notifier\n");
 		atomic_notifier_chain_register(&panic_notifier_list,
 					       &paniced);
+#ifdef CONFIG_MAGIC_SYSRQ
 		register_sysrq_key('v', &sysrq_drm_fb_helper_restore_op);
+#endif
 	}
 	list_add(&fb_helper->kernel_fb_list, &kernel_fb_helper_list);
 	return 0;
@@ -927,7 +929,9 @@ void drm_fb_helper_free(struct drm_fb_helper *helper)
 		printk(KERN_INFO "unregistered panic notifier\n");
 		atomic_notifier_chain_unregister(&panic_notifier_list,
 						 &paniced);
+#ifdef CONFIG_MAGIC_SYSRQ
 		unregister_sysrq_key('v', &sysrq_drm_fb_helper_restore_op);
+#endif
 	}
 	drm_fb_helper_crtc_free(helper);
 	fb_dealloc_cmap(&helper->fb->fbdev->cmap);

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-03-31  4:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-31  4:18 [PATCH] drm: build error when magic sysrq isn't enabled Changli Gao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).