[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <491C40C2.7000302@ru.mvista.com>
Date: Thu, 13 Nov 2008 17:59:14 +0300
From: Sergei Shtylyov <sshtylyov@...mvista.com>
To: Kevin Hao <kexin.hao@...driver.com>
Cc: LKML <linux-kernel@...r.kernel.org>, gregkh@...e.de,
Alan Cox <alan@...hat.com>, linux-usb@...r.kernel.org
Subject: Re: [PATCH 2/2] add device function for usb serial console
Hello.
Kevin Hao wrote:
> Add device funtion for usb serial console, so we can open /dev/console
> when we use a usb serial device as console.
> Signed-off-by: Kevin Hao <kexin.hao@...driver.com>
> diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c
> index 5b95009..1dbb203 100644
> --- a/drivers/usb/serial/console.c
> +++ b/drivers/usb/serial/console.c
> @@ -241,12 +241,25 @@ static void usb_console_write(struct console *co,
> }
> }
>
> +static struct tty_driver *usb_console_device(struct console *co, int *index)
> +{
> + struct tty_driver **p = (struct tty_driver **)co->data;
> +
> + if (!*p)
> + return NULL;
> +
> + *index = co->index;
> + return (struct tty_driver *)(*p);
Type cast not needed here.
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists