RE: [PATCH v2] tty: serial: samsung_tty: support more than 4 uart ports

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

 



> > --- a/drivers/tty/serial/samsung_tty.c
> > +++ b/drivers/tty/serial/samsung_tty.c
> ...
> > @@ -1810,67 +1816,27 @@ static const struct uart_ops
> > apple_s5l_serial_ops = {
> ...
> > +static struct s3c24xx_uart_port s3c24xx_serial_ports[UART_NR];
> > +
> > +static void s3c24xx_serial_init_port_default(int index) {
> 
> The opening brace should be on a separate line.

Oh, I missed this. Thanks for your review.
I'll make a separate patch to fix this.

> 
> > +	struct uart_port *port = &s3c24xx_serial_ports[index].port;
> > +
> > +	spin_lock_init(&port->lock);
> > +
> > +	port->iotype = UPIO_MEM;
> > +	port->uartclk = 0;
> > +	port->fifosize = 16;
> > +	port->ops = &s3c24xx_serial_ops;
> > +	port->flags = UPF_BOOT_AUTOCONF;
> > +	port->line = index;
> > +}
> >
> >   /* s3c24xx_serial_resetport
> >    *
> > @@ -2186,6 +2152,8 @@ static int s3c24xx_serial_probe(struct
> platform_device *pdev)
> >   	}
> >   	ourport = &s3c24xx_serial_ports[index];
> >
> > +	s3c24xx_serial_init_port_default(index);
> 
> Perhaps pass &ourport->port to the function too -- you'd save the refetch
> there.

&ourport->port will be retrieved by index in the s3c24xx_serial_init_port_default.
Why do I need to pass it?

+	struct uart_port *port = &s3c24xx_serial_ports[index].port;

Best Regards,
Chanho Park





[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