[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210104072756.xdvsryok3sxdiytg@vireshk-i7>
Date: Mon, 4 Jan 2021 12:57:56 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Yangtao Li <tiny.windzz@...il.com>
Cc: linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-samsung-soc@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-tegra@...r.kernel.org,
dri-devel@...ts.freedesktop.org, lima@...ts.freedesktop.org,
linux-arm-msm@...r.kernel.org, freedreno@...ts.freedesktop.org,
linux-media@...r.kernel.org, linux-mmc@...r.kernel.org,
linux-spi@...r.kernel.org, linux-serial@...r.kernel.org
Subject: Re: [PATCH 07/31] serial: qcom_geni_serial: convert to use
devm_pm_opp_* API
Dropped lots of people from cc list
On 04-01-21, 12:49, Viresh Kumar wrote:
> On 01-01-21, 16:54, Yangtao Li wrote:
> > Use devm_pm_opp_* API to simplify code, and we don't need
> > to make opp_table glabal.
> >
> > Let's remove opp_table from geni_se later.
> >
> > Signed-off-by: Yangtao Li <tiny.windzz@...il.com>
> > ---
> > drivers/tty/serial/qcom_geni_serial.c | 23 +++++++++--------------
> > 1 file changed, 9 insertions(+), 14 deletions(-)
> >
> > diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
> > index 5aada7ebae35..36a92df8ec11 100644
> > --- a/drivers/tty/serial/qcom_geni_serial.c
> > +++ b/drivers/tty/serial/qcom_geni_serial.c
> > @@ -1352,6 +1352,7 @@ static int qcom_geni_serial_probe(struct platform_device *pdev)
> > int irq;
> > bool console = false;
> > struct uart_driver *drv;
> > + struct opp_table *opp_table;
> >
> > if (of_device_is_compatible(pdev->dev.of_node, "qcom,geni-debug-uart"))
> > console = true;
> > @@ -1433,13 +1434,13 @@ static int qcom_geni_serial_probe(struct platform_device *pdev)
> > if (of_property_read_bool(pdev->dev.of_node, "cts-rts-swap"))
> > port->cts_rts_swap = true;
> >
> > - port->se.opp_table = dev_pm_opp_set_clkname(&pdev->dev, "se");
> > - if (IS_ERR(port->se.opp_table))
> > - return PTR_ERR(port->se.opp_table);
> > + opp_table = devm_pm_opp_set_clkname(&pdev->dev, "se");
> > + if (IS_ERR(opp_table))
> > + return PTR_ERR(opp_table);
> > /* OPP table is optional */
> > - ret = dev_pm_opp_of_add_table(&pdev->dev);
> > + ret = devm_pm_opp_of_add_table(&pdev->dev);
> > if (ret) {
> > - dev_pm_opp_put_clkname(port->se.opp_table);
> > + devm_pm_opp_put_clkname(&pdev->dev, opp_table);
>
> We shouldn't be doing this here, i.e. put_clkname. Even when the OPP
> table isn't present, this driver calls dev_pm_opp_set_rate() which
> behaves like clk_set_rate() in this case and so the clk name is still
> required by the OPP core.
The same problem is there with multiple patches, fix them all please.
--
viresh
Powered by blists - more mailing lists