summaryrefslogtreecommitdiff
path: root/include/linux/console.h
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2020-02-03 15:31:30 +0200
committerPetr Mladek <pmladek@suse.com>2020-02-11 10:44:22 +0100
commited31685c96e18f773ca11dd1a637974d62130673 (patch)
tree0cb9fcbf8d3ebb43a1382f6a2ed757547963e2b9 /include/linux/console.h
parente78bedbd42b7caa65551f3d56cbff451ccbd0aee (diff)
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>
Diffstat (limited to 'include/linux/console.h')
-rw-r--r--include/linux/console.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/console.h b/include/linux/console.h
index d09951d5a94e..0cbd2a36aa00 100644
--- a/include/linux/console.h
+++ b/include/linux/console.h
@@ -149,6 +149,7 @@ struct console {
struct tty_driver *(*device)(struct console *, int *);
void (*unblank)(void);
int (*setup)(struct console *, char *);
+ int (*exit)(struct console *);
int (*match)(struct console *, char *name, int idx, char *options);
short flags;
short index;