Re: [PATCH 6/7] serial: sh-sci: make RX FIFO parameters tunable via sysfs

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

 



Hi Uli,

On Fri, Dec 9, 2016 at 1:36 PM, Ulrich Hecht
<ulrich.hecht+renesas@xxxxxxxxx> wrote:
> Allows tuning of the RX FIFO fill threshold and timeout. (The latter is
> only applicable to SCIFA and SCIFB).
>
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@xxxxxxxxx>

> --- a/drivers/tty/serial/sh-sci.c
> +++ b/drivers/tty/serial/sh-sci.c

> @@ -3193,6 +3262,19 @@ static int sci_probe(struct platform_device *dev)
>         if (ret)
>                 return ret;
>
> +       if (sp->port.fifosize > 1) {
> +               ret = sysfs_create_file(&dev->dev.kobj,
> +                               &dev_attr_rx_fifo_trigger.attr);
> +               if (ret)
> +                       return ret;
> +       }
> +       if (sp->port.type == PORT_SCIFA || sp->port.type ==  PORT_SCIFB) {
> +               ret = sysfs_create_file(&dev->dev.kobj,
> +                               &dev_attr_rx_fifo_timeout.attr);
> +               if (ret)
> +                       return ret;

Returning here may leak the rx_fifo_trigger file created above.

> +       }

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux