public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Hurley <peter@hurleysoftware.com>
To: Wang YanQing <udknight@gmail.com>,
	airlied@redhat.com, linux-kernel@vger.kernel.org
Cc: gregkh@linuxfoundation.org, jslaby@suse.cz, alan@linux.intel.com
Subject: Re: [PATCH 3/9] vt: delete unneeded functions register_con_driver|take_over_console
Date: Wed, 08 May 2013 15:56:49 -0400	[thread overview]
Message-ID: <518AAE01.2010005@hurleysoftware.com> (raw)
In-Reply-To: <20130508181359.GD12344@udknight>

On 05/08/2013 02:13 PM, Wang YanQing wrote:
> Now there is no place use register_con_driver|take_over_console,
> and we can achieve their function with do_register_con_driver|
> do_take_over_console easily, so just delete them to reduce code duplication.
>
> Signed-off-by: Wang YanQing <udknight@gmail.com>
> ---
>   drivers/tty/vt/vt.c     | 45 ---------------------------------------------
>   include/linux/console.h |  2 --
>   2 files changed, 47 deletions(-)
>
> diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
> index fbd447b..852d470 100644
> --- a/drivers/tty/vt/vt.c
> +++ b/drivers/tty/vt/vt.c
> @@ -3576,26 +3576,6 @@ err:
>   	return retval;
>   }
>
> -/**
> - * register_con_driver - register console driver to console layer
> - * @csw: console driver
> - * @first: the first console to take over, minimum value is 0
> - * @last: the last console to take over, maximum value is MAX_NR_CONSOLES -1
> - *
> - * DESCRIPTION: This function registers a console driver which can later
> - * bind to a range of consoles specified by @first and @last. It will
> - * also initialize the console driver by calling con_startup().
> - */
> -int register_con_driver(const struct consw *csw, int first, int last)
> -{
> -	int retval;
> -
> -	console_lock();
> -	retval = do_register_con_driver(csw, first, last);
> -	console_unlock();
> -	return retval;
> -}
> -EXPORT_SYMBOL(register_con_driver);

Maybe register_con_driver() should print a deprecated warning
for a release or two before we remove it.

>   /**
>    * unregister_con_driver - unregister console driver from console layer
> @@ -3677,30 +3657,6 @@ int do_take_over_console(const struct consw *csw, int first, int last, int deflt
>   }
>   EXPORT_SYMBOL_GPL(do_take_over_console);
>
> -/*
> - *	If we support more console drivers, this function is used
> - *	when a driver wants to take over some existing consoles
> - *	and become default driver for newly opened ones.
> - *
> - *	take_over_console is basically a register followed by unbind
> - */
> -int take_over_console(const struct consw *csw, int first, int last, int deflt)
> -{
> -	int err;
> -
> -	err = register_con_driver(csw, first, last);
> -	/*
> -	 * If we get an busy error we still want to bind the console driver
> -	 * and return success, as we may have unbound the console driver
> -	 * but not unregistered it.
> -	 */
> -	if (err == -EBUSY)
> -		err = 0;
> -	if (!err)
> -		bind_con_driver(csw, first, last, deflt);
> -
> -	return err;
> -}
>
>   /*
>    * give_up_console is a wrapper to unregister_con_driver. It will only
> @@ -4264,6 +4220,5 @@ EXPORT_SYMBOL(console_blanked);
>   EXPORT_SYMBOL(vc_cons);
>   EXPORT_SYMBOL(global_cursor_default);
>   #ifndef VT_SINGLE_DRIVER
> -EXPORT_SYMBOL(take_over_console);

This effectively converts take_over_console() to require GPL now.



  reply	other threads:[~2013-05-08 19:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-08 18:13 [PATCH 3/9] vt: delete unneeded functions register_con_driver|take_over_console Wang YanQing
2013-05-08 19:56 ` Peter Hurley [this message]
2013-05-08 20:14   ` Greg KH
2013-05-08 20:37     ` Peter Hurley
2013-05-08 20:45       ` Greg KH
2013-05-09 11:31         ` Peter Hurley
2013-05-09 15:15           ` Greg KH
2013-05-17 16:49             ` [PATCH] tty: Remove TTY_HW_COOK_IN/OUT Peter Hurley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=518AAE01.2010005@hurleysoftware.com \
    --to=peter@hurleysoftware.com \
    --cc=airlied@redhat.com \
    --cc=alan@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=udknight@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox