Re: [PATCH 1/2] tty/serial: atmel: remove unused variable atmel_default_console_device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 23/06/2017 at 10:46:51 +0200, Richard Genoud wrote:
> Hi Uwe,
> 
> Actually, a similar patch has already been sent by Alexandre (but not
> yet taken by Greg) :
> 
> https://www.mail-archive.com/linux-kernel@xxxxxxxxxxxxxxx/msg1420770.html
> 

The series was taken, see:

https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git/commit/?h=tty-next&id=274a5ed6d8ca16f65bccdce95a14ecf29ff81764

> 
> 2017-06-21 11:30 GMT+02:00 Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>:
> > Since commit
> >
> >         26202873bb51 ("avr32: remove support for AVR32 architecture")
> >
> > the last user of this variable is gone. As a side effect this removes a
> > usage of pdata->num without checking pdata for being non-NULL.
> >
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
> > ---
> >  drivers/tty/serial/atmel_serial.c | 43 ---------------------------------------
> >  1 file changed, 43 deletions(-)
> >
> > diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> > index c355ac9abafc..906e2b91bf57 100644
> > --- a/drivers/tty/serial/atmel_serial.c
> > +++ b/drivers/tty/serial/atmel_serial.c
> > @@ -2460,8 +2460,6 @@ static int atmel_init_port(struct atmel_uart_port *atmel_port,
> >         return 0;
> >  }
> >
> > -struct platform_device *atmel_default_console_device;  /* the serial console device */
> > -
> >  #ifdef CONFIG_SERIAL_ATMEL_CONSOLE
> >  static void atmel_console_putchar(struct uart_port *port, int ch)
> >  {
> > @@ -2594,47 +2592,6 @@ static struct console atmel_console = {
> >
> >  #define ATMEL_CONSOLE_DEVICE   (&atmel_console)
> >
> > -/*
> > - * Early console initialization (before VM subsystem initialized).
> > - */
> > -static int __init atmel_console_init(void)
> > -{
> > -       int ret;
> > -       if (atmel_default_console_device) {
> > -               struct atmel_uart_data *pdata =
> > -                       dev_get_platdata(&atmel_default_console_device->dev);
> > -               int id = pdata->num;
> > -               struct atmel_uart_port *atmel_port = &atmel_ports[id];
> > -
> > -               atmel_port->backup_imr = 0;
> > -               atmel_port->uart.line = id;
> > -
> > -               add_preferred_console(ATMEL_DEVICENAME, id, NULL);
> > -               ret = atmel_init_port(atmel_port, atmel_default_console_device);
> > -               if (ret)
> > -                       return ret;
> > -               register_console(&atmel_console);
> > -       }
> > -
> > -       return 0;
> > -}
> > -
> > -console_initcall(atmel_console_init);
> > -
> > -/*
> > - * Late console initialization.
> > - */
> > -static int __init atmel_late_console_init(void)
> > -{
> > -       if (atmel_default_console_device
> > -           && !(atmel_console.flags & CON_ENABLED))
> > -               register_console(&atmel_console);
> > -
> > -       return 0;
> > -}
> > -
> > -core_initcall(atmel_late_console_init);
> > -
> >  static inline bool atmel_is_console_port(struct uart_port *port)
> >  {
> >         return port->cons && port->cons->index == port->line;
> > --
> > 2.11.0
> >

-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux