Re: [PATCH v3 1/3] serial: 8250: Add IrDA to UART capabilities

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

 



On Mon, Oct 31, 2016 at 05:26:45PM +0000, Ed Blake wrote:
> Add an IrDA UART capability flag and change the type of
> uart_8250_port.capabilities to be unsigned int rather than unsigned
> short to accommodate the additional flag.
> 
> Signed-off-by: Ed Blake <ed.blake@xxxxxxxxxx>
> ---
>  arch/x86/platform/ce4100/ce4100.c   | 2 +-
>  drivers/tty/serial/8250/8250.h      | 1 +
>  drivers/tty/serial/8250/8250_core.c | 4 ++--
>  include/linux/serial_8250.h         | 4 ++--
>  4 files changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/x86/platform/ce4100/ce4100.c b/arch/x86/platform/ce4100/ce4100.c
> index b27bccd..b326f4d 100644
> --- a/arch/x86/platform/ce4100/ce4100.c
> +++ b/arch/x86/platform/ce4100/ce4100.c
> @@ -89,7 +89,7 @@ static void ce4100_mem_serial_out(struct uart_port *p, int offset, int value)
>  }
>  
>  static void ce4100_serial_fixup(int port, struct uart_port *up,
> -	unsigned short *capabilites)
> +	unsigned int *capabilites)
>  {
>  #ifdef CONFIG_EARLY_PRINTK
>  	/*
> diff --git a/drivers/tty/serial/8250/8250.h b/drivers/tty/serial/8250/8250.h
> index a697a85..0c23b00 100644
> --- a/drivers/tty/serial/8250/8250.h
> +++ b/drivers/tty/serial/8250/8250.h
> @@ -80,6 +80,7 @@ struct serial8250_config {
>  #define UART_CAP_RTOIE	(1 << 13)	/* UART needs IER bit 4 set (Xscale, Tegra) */
>  #define UART_CAP_HFIFO	(1 << 14)	/* UART has a "hidden" FIFO */
>  #define UART_CAP_RPM	(1 << 15)	/* Runtime PM is active while idle */
> +#define UART_CAP_IRDA	(1 << 16)	/* UART supports IrDA line discipline */
>  
>  #define UART_BUG_QUOT	(1 << 0)	/* UART has buggy quot LSB */
>  #define UART_BUG_TXEN	(1 << 1)	/* UART has buggy TX IIR status */
> diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
> index 240a361..8a4d53a 100644
> --- a/drivers/tty/serial/8250/8250_core.c
> +++ b/drivers/tty/serial/8250/8250_core.c
> @@ -425,10 +425,10 @@ struct uart_8250_port *serial8250_get_port(int line)
>  EXPORT_SYMBOL_GPL(serial8250_get_port);
>  
>  static void (*serial8250_isa_config)(int port, struct uart_port *up,
> -	unsigned short *capabilities);
> +	unsigned int *capabilities);
>  
>  void serial8250_set_isa_configurator(
> -	void (*v)(int port, struct uart_port *up, unsigned short *capabilities))
> +	void (*v)(int port, struct uart_port *up, unsigned int *capabilities))
>  {
>  	serial8250_isa_config = v;
>  }
> diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h
> index 48ec765..4676968 100644
> --- a/include/linux/serial_8250.h
> +++ b/include/linux/serial_8250.h
> @@ -94,7 +94,7 @@ struct uart_8250_port {
>  	struct uart_port	port;
>  	struct timer_list	timer;		/* "no irq" timer */
>  	struct list_head	list;		/* ports on this IRQ */
> -	unsigned short		capabilities;	/* port capabilities */
> +	unsigned int		capabilities;	/* port capabilities */
>  	unsigned short		bugs;		/* port bugs */

It doesn't matter that much, but now you have some extra "padding" in
here, can you move this somewhere that makes more sense and keep things
aligned?

Also, make it a u32 so we explicitly know it is 32 bits big, and not
just a random "int" size.

thanks,

greg k-h
--
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