Modify it to adjust Tizen IVI enviroment
[platform/upstream/kmscon.git] / fblog / 0010-fblog-add-activate-module-parameter.patch
1 From 308643219b3ec4cb8c772459af6330d06d8bda82 Mon Sep 17 00:00:00 2001
2 From: David Herrmann <dh.herrmann@googlemail.com>
3 Date: Sat, 16 Jun 2012 23:31:18 +0200
4 Subject: [PATCH 10/10] fblog: add "activate" module parameter
5
6 This new parameter controls whether fblog is automatically activated when
7 it is loaded. This defaults to "true".
8
9 We can now compile with CONFIG_VT=n and CONFIG_FBLOG=y and control fblog
10 with fblog.activate=0/1 on the kernel command line to enable/disable
11 debugging.
12
13 Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
14 ---
15  drivers/video/console/fblog.c |   10 ++++++++++
16  1 file changed, 10 insertions(+)
17
18 diff --git a/drivers/video/console/fblog.c b/drivers/video/console/fblog.c
19 index 9d3b072..cabc550 100644
20 --- a/drivers/video/console/fblog.c
21 +++ b/drivers/video/console/fblog.c
22 @@ -94,6 +94,7 @@ struct fblog_fb {
23  static struct fblog_fb *fblog_fbs[FB_MAX];
24  static struct device *fblog_device;
25  static atomic_t fblog_active;
26 +static bool activate = 1;
27  
28  static void fblog_buf_resize(struct fblog_buf *buf, size_t width,
29                              size_t height)
30 @@ -653,6 +654,12 @@ static int __init fblog_init(void)
31  
32         register_console(&fblog_con_driver);
33  
34 +       if (activate) {
35 +               console_lock();
36 +               fblog_activate();
37 +               console_unlock();
38 +       }
39 +
40         return 0;
41  
42  err_fb:
43 @@ -677,6 +684,9 @@ static void __exit fblog_exit(void)
44         put_device(fblog_device);
45  }
46  
47 +module_param(activate, bool, S_IRUGO);
48 +MODULE_PARM_DESC(activate, "Activate fblog by default");
49 +
50  module_init(fblog_init);
51  module_exit(fblog_exit);
52  MODULE_LICENSE("GPL");
53 -- 
54 1.7.10.4
55