diff options
author | Wang YanQing <udknight@gmail.com> | 2013-05-21 11:29:11 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-21 13:21:57 -0400 |
commit | 6b5f146535fe6969aeded9f00b0bc42b3783f7fd (patch) | |
tree | 068c236d520801c372c3112dbf3d9ea37ac92b65 | |
parent | 155957f56c3537dbb63bbb63c39067987c061a6d (diff) |
TTY:console: update document console.txt
Update Documentatin/console/console.txt to
reflect the following changes:
take_over_console|register_con_driver|unregister_con_driver|bind_con_driver
had gone, they had been replace by the new caller hold console lock version,
do_take_over_console|do_register_con_driver|do_unregister_con_driver|do_bind_con_driver.
This patch also fix a place include wrong description about give_up_console.
Signed-off-by: Wang YanQing <udknight@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | Documentation/console/console.txt | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Documentation/console/console.txt b/Documentation/console/console.txt index 926cf1b5e63e..f93810d599ad 100644 --- a/Documentation/console/console.txt +++ b/Documentation/console/console.txt | |||
@@ -12,20 +12,20 @@ The second type has to be explicitly loaded and unloaded. This will be called | |||
12 | any time with each driver sharing the console with other drivers including | 12 | any time with each driver sharing the console with other drivers including |
13 | the system driver. However, modular drivers cannot take over the console | 13 | the system driver. However, modular drivers cannot take over the console |
14 | that is currently occupied by another modular driver. (Exception: Drivers that | 14 | that is currently occupied by another modular driver. (Exception: Drivers that |
15 | call take_over_console() will succeed in the takeover regardless of the type | 15 | call do_take_over_console() will succeed in the takeover regardless of the type |
16 | of driver occupying the consoles.) They can only take over the console that is | 16 | of driver occupying the consoles.) They can only take over the console that is |
17 | occupied by the system driver. In the same token, if the modular driver is | 17 | occupied by the system driver. In the same token, if the modular driver is |
18 | released by the console, the system driver will take over. | 18 | released by the console, the system driver will take over. |
19 | 19 | ||
20 | Modular drivers, from the programmer's point of view, has to call: | 20 | Modular drivers, from the programmer's point of view, has to call: |
21 | 21 | ||
22 | take_over_console() - load and bind driver to console layer | 22 | do_take_over_console() - load and bind driver to console layer |
23 | give_up_console() - unbind and unload driver | 23 | give_up_console() - unload driver, it will only work if driver is fully unbond |
24 | 24 | ||
25 | In newer kernels, the following are also available: | 25 | In newer kernels, the following are also available: |
26 | 26 | ||
27 | register_con_driver() | 27 | do_register_con_driver() |
28 | unregister_con_driver() | 28 | do_unregister_con_driver() |
29 | 29 | ||
30 | If sysfs is enabled, the contents of /sys/class/vtconsole can be | 30 | If sysfs is enabled, the contents of /sys/class/vtconsole can be |
31 | examined. This shows the console backends currently registered by the | 31 | examined. This shows the console backends currently registered by the |
@@ -94,12 +94,12 @@ for more details). | |||
94 | Notes for developers: | 94 | Notes for developers: |
95 | ===================== | 95 | ===================== |
96 | 96 | ||
97 | take_over_console() is now broken up into: | 97 | do_take_over_console() is now broken up into: |
98 | 98 | ||
99 | register_con_driver() | 99 | do_register_con_driver() |
100 | bind_con_driver() - private function | 100 | do_bind_con_driver() - private function |
101 | 101 | ||
102 | give_up_console() is a wrapper to unregister_con_driver(), and a driver must | 102 | give_up_console() is a wrapper to do_unregister_con_driver(), and a driver must |
103 | be fully unbound for this call to succeed. con_is_bound() will check if the | 103 | be fully unbound for this call to succeed. con_is_bound() will check if the |
104 | driver is bound or not. | 104 | driver is bound or not. |
105 | 105 | ||
@@ -109,10 +109,10 @@ Guidelines for console driver writers: | |||
109 | In order for binding to and unbinding from the console to properly work, | 109 | In order for binding to and unbinding from the console to properly work, |
110 | console drivers must follow these guidelines: | 110 | console drivers must follow these guidelines: |
111 | 111 | ||
112 | 1. All drivers, except system drivers, must call either register_con_driver() | 112 | 1. All drivers, except system drivers, must call either do_register_con_driver() |
113 | or take_over_console(). register_con_driver() will just add the driver to | 113 | or do_take_over_console(). do_register_con_driver() will just add the driver to |
114 | the console's internal list. It won't take over the | 114 | the console's internal list. It won't take over the |
115 | console. take_over_console(), as it name implies, will also take over (or | 115 | console. do_take_over_console(), as it name implies, will also take over (or |
116 | bind to) the console. | 116 | bind to) the console. |
117 | 117 | ||
118 | 2. All resources allocated during con->con_init() must be released in | 118 | 2. All resources allocated during con->con_init() must be released in |
@@ -128,10 +128,10 @@ console drivers must follow these guidelines: | |||
128 | rebind the driver to the console arrives. | 128 | rebind the driver to the console arrives. |
129 | 129 | ||
130 | 4. Upon exit of the driver, ensure that the driver is totally unbound. If the | 130 | 4. Upon exit of the driver, ensure that the driver is totally unbound. If the |
131 | condition is satisfied, then the driver must call unregister_con_driver() | 131 | condition is satisfied, then the driver must call do_unregister_con_driver() |
132 | or give_up_console(). | 132 | or give_up_console(). |
133 | 133 | ||
134 | 5. unregister_con_driver() can also be called on conditions which make it | 134 | 5. do_unregister_con_driver() can also be called on conditions which make it |
135 | impossible for the driver to service console requests. This can happen | 135 | impossible for the driver to service console requests. This can happen |
136 | with the framebuffer console that suddenly lost all of its drivers. | 136 | with the framebuffer console that suddenly lost all of its drivers. |
137 | 137 | ||