linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Thomas <pthomas8589@gmail.com>
To: Michal Simek <michal.simek@xilinx.com>
Cc: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>,
	Kroah-Hartman <gregkh@linuxfoundation.org>,
	Sasha Levin <sashal@kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Regression: commit c9712e333809 breaks xilinx_uartps
Date: Thu, 12 Sep 2019 12:38:43 -0400	[thread overview]
Message-ID: <CAD56B7dvKtqQV9hkKEKB7VgoE8hqQGqMxHZiCXxg0sejUpsNCg@mail.gmail.com> (raw)
In-Reply-To: <33ec2a52-91aa-6c4a-d900-1725f2970975@xilinx.com>

> > ---
> >  drivers/tty/serial/xilinx_uartps.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/tty/serial/xilinx_uartps.c
> > b/drivers/tty/serial/xilinx_uartps.c
> > index 9dcc4d855ddd..ece7f6caa994 100644
> > --- a/drivers/tty/serial/xilinx_uartps.c
> > +++ b/drivers/tty/serial/xilinx_uartps.c
> > @@ -1565,6 +1565,8 @@ static int cdns_uart_probe(struct platform_device *pdev)
> >
> >         cdns_uart_data->pclk = devm_clk_get(&pdev->dev, "pclk");
> >         if (PTR_ERR(cdns_uart_data->pclk) == -EPROBE_DEFER) {
> > +               /* If we end up defering then set uartps_major back to 0 */
> > +               uartps_major = 0;
> >                 rc = PTR_ERR(cdns_uart_data->pclk);
> >                 goto err_out_unregister_driver;
> >         }
> >
>
> I expect that this can be problematic for all failures in probe.
> What about this?
Makes sense, this worked for me. Although, I think the patch is
malformed by the email line lengths.

-Paul

> Just setting up global major number if first instance
> pass.
> Also cleanup should be likely done in remove function too.
>
>
>  diff --git a/drivers/tty/serial/xilinx_uartps.c
> b/drivers/tty/serial/xilinx_uartps.c
>  index f145946f659b..c1550b45d59b 100644
>  --- a/drivers/tty/serial/xilinx_uartps.c
>  +++ b/drivers/tty/serial/xilinx_uartps.c
>  @@ -1550,7 +1550,6 @@ static int cdns_uart_probe(struct platform_device
> *pdev)
>                  goto err_out_id;
>          }
>
>  -       uartps_major = cdns_uart_uart_driver->tty_driver->major;
>          cdns_uart_data->cdns_uart_driver = cdns_uart_uart_driver;
>
>          /*
>  @@ -1680,6 +1679,7 @@ static int cdns_uart_probe(struct platform_device
> *pdev)
>                  console_port = NULL;
>   #endif
>
>  +       uartps_major = cdns_uart_uart_driver->tty_driver->major;
>          cdns_uart_data->cts_override =
> of_property_read_bool(pdev->dev.of_node,
>
> "cts-override");
>          return 0;
>
> Thanks,
> Michal

  reply	other threads:[~2019-09-12 16:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-11 17:04 Regression: commit c9712e333809 breaks xilinx_uartps Paul Thomas
2019-09-12  5:53 ` Michal Simek
2019-09-12 16:38   ` Paul Thomas [this message]
2019-09-13  6:03     ` Michal Simek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAD56B7dvKtqQV9hkKEKB7VgoE8hqQGqMxHZiCXxg0sejUpsNCg@mail.gmail.com \
    --to=pthomas8589@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=sashal@kernel.org \
    --cc=shubhrajyoti.datta@xilinx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).