]> git.baikalelectronics.ru Git - kernel.git/commit
console: Introduce ->exit() callback
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 3 Feb 2020 13:31:30 +0000 (15:31 +0200)
committerPetr Mladek <pmladek@suse.com>
Tue, 11 Feb 2020 09:44:22 +0000 (10:44 +0100)
commit183f58536f477b9b37e9f58521f513930a6d0a50
tree0cb9fcbf8d3ebb43a1382f6a2ed757547963e2b9
parent4b709c71a9a18cfb07e0fcec9f0ade829bdd2b38
console: Introduce ->exit() callback

Some consoles might require special operations on unregistering.
For instance, serial console, when registered in the kernel,
keeps power on for entire time, until it gets unregistered.
Example of use:

->setup(console):
pm_runtime_get(...);

->exit(console):
pm_runtime_put(...);

For such cases to have a balance we would provide ->exit() callback.

Link: http://lkml.kernel.org/r/20200203133130.11591-7-andriy.shevchenko@linux.intel.com
To: linux-kernel@vger.kernel.org
To: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
include/linux/console.h
kernel/printk/printk.c