Re: [PATCH v9 1/3] tty: rename tty_kopen() and add new function tty_kopen_shared()

From: Pavel Machek
Date: Tue Oct 20 2020 - 08:25:18 EST


Hi1

> Introduce a new function tty_kopen_shared() that yields a struct
> tty_struct. The semantic difference to tty_kopen() is that the tty is
> expected to be used already. So rename tty_kopen() to
> tty_kopen_exclusive() for clearness, adapt the single user and put the
> common code in a new static helper function.
>
> tty_kopen_shared is to be used to implement an LED trigger for tty
> devices in one of the next patches.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
> ---
> drivers/accessibility/speakup/spk_ttyio.c | 2 +-
> drivers/tty/tty_io.c | 56 +++++++++++++++--------
> include/linux/tty.h | 5 +-
> 3 files changed, 42 insertions(+), 21 deletions(-)

> -struct tty_struct *tty_kopen(dev_t device)
> +static struct tty_struct *tty_kopen(dev_t device, int shared)
> {

bool? Otherwise I see nothing obviously wrong here.

But this is for Greg..

Best regards,
Pavel

--
http://www.livejournal.com/~pavelmachek

Attachment: signature.asc
Description: PGP signature