lkml.org 
[lkml]   [2020]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3 5/5] console: Introduce ->exit() callback
On (20/01/30 00:12), Sergey Senozhatsky wrote:
> On (20/01/29 16:25), Andy Shevchenko wrote:
> > I understand. Seems the ->setup() has to be idempotent. We can tell the same
> > for ->exit() in some comment.
> >
> > Can you describe, btw, struct console in kernel doc format?
> > It will be very helpful!
>
> We probably need some documentation.
>
> > > > In both cases we will get the console to have CON_ENABLED flag set.
> > >
> > > And there are sneaky consoles that have CON_ENABLED before we even
> > > register them.
> >
> > So, taking into consideration my comment to the previous patch, what would be
> > suggested guard here?
> >
> > For a starter something like this?
> >
> > if ((console->flags & CON_ENABLED) && console->exit)
> > console->exit(console);
>
> This will work if we also add something like this

No, wait... This will not work, console can be suspended, yet
still registered. I think the only criteria is "the console is
on the list".

-ss

\
 
 \ /
  Last update: 2020-01-29 17:51    [W:0.072 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site