Re: [PATCH V2 1/2] tty: serial: qcom_geni_serial: IRQ cleanup

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

 



Quoting Akash Asthana (2019-10-10 02:46:03)
> diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
> index 14c6306..5180cd8 100644
> --- a/drivers/tty/serial/qcom_geni_serial.c
> +++ b/drivers/tty/serial/qcom_geni_serial.c
> @@ -1297,11 +1291,21 @@ static int qcom_geni_serial_probe(struct platform_device *pdev)
>         port->rx_fifo_depth = DEF_FIFO_DEPTH_WORDS;
>         port->tx_fifo_width = DEF_FIFO_WIDTH_BITS;
>  
> +       scnprintf(port->name, sizeof(port->name), "qcom_geni_serial_%s%d",
> +               (uart_console(uport) ? "console" : "uart"), uport->line);

Drop useless parenthesis. Also, it might make more sense to make this a
devm_kasprintf() call now.

>         irq = platform_get_irq(pdev, 0);
>         if (irq < 0)
>                 return irq;
>         uport->irq = irq;
>  
> +       irq_set_status_flags(uport->irq, IRQ_NOAUTOEN);

Is there a reason why we can't always leave the irq enabled and request
it later once the uart structure has been fully initialized?

> +       ret = devm_request_irq(uport->dev, uport->irq, qcom_geni_serial_isr,
> +                       IRQF_TRIGGER_HIGH, port->name, uport);
> +       if (ret) {
> +               dev_err(uport->dev, "Failed to get IRQ ret %d\n", ret);
> +               return ret;
> +       }
> +
>         uport->private_data = drv;
>         platform_set_drvdata(pdev, port);
>         port->handle_rx = console ? handle_rx_console : handle_rx_uart;




[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