[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAGTfZH1eE_a-qvOb+GDRogipNS1c+K48JL6pYQ3UovpQR9zUbA@mail.gmail.com>
Date: Tue, 5 Jan 2021 13:20:24 +0900
From: Chanwoo Choi <cwchoi00@...il.com>
To: Yangtao Li <tiny.windzz@...il.com>
Cc: MyungJoo Ham <myungjoo.ham@...sung.com>,
Kyungmin Park <kyungmin.park@...sung.com>,
Chanwoo Choi <cw00.choi@...sung.com>,
Krzysztof Kozlowski <krzk@...nel.org>,
Shawn Guo <shawnguo@...nel.org>, s.hauer@...gutronix.de,
kernel@...gutronix.de, festevam@...il.com,
dl-linux-imx <linux-imx@....com>,
Dmitry Osipenko <digetx@...il.com>,
Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>, yuq825@...il.com,
David Airlie <airlied@...ux.ie>, daniel@...ll.ch,
robdclark@...il.com, sean@...rly.run,
Rob Herring <robh@...nel.org>, tomeu.vizoso@...labora.com,
steven.price@....com, alyssa.rosenzweig@...labora.com,
stanimir.varbanov@...aro.org, agross@...nel.org,
Bjorn Andersson <bjorn.andersson@...aro.org>,
mchehab@...nel.org, Lukasz Luba <lukasz.luba@....com>,
adrian.hunter@...el.com, Ulf Hansson <ulf.hansson@...aro.org>,
Viresh Kumar <vireshk@...nel.org>, Nishanth Menon <nm@...com>,
Stephen Boyd <sboyd@...nel.org>,
Mark Brown <broonie@...nel.org>,
Greg KH <gregkh@...uxfoundation.org>, jirislaby@...nel.org,
"Rafael J. Wysocki" <rjw@...ysocki.net>, jcrouse@...eaurora.org,
hoegsberg@...gle.com, eric@...olt.net, tzimmermann@...e.de,
marijn.suijten@...ainline.org, gustavoars@...nel.org,
emil.velikov@...labora.com, jonathan@...ek.ca,
akhilpo@...eaurora.org, smasetty@...eaurora.org,
airlied@...hat.com, masneyb@...tation.org, kalyan_t@...eaurora.org,
tanmay@...eaurora.org, ddavenport@...omium.org,
jsanka@...eaurora.org, rnayak@...eaurora.org,
tongtiangen@...wei.com, miaoqinglang@...wei.com,
khsieh@...eaurora.org, abhinavk@...eaurora.org,
chandanu@...eaurora.org, Guenter Roeck <groeck@...omium.org>,
varar@...eaurora.org, Matthias Kaehlcke <mka@...omium.org>,
harigovi@...eaurora.org, rikard.falkeborn@...il.com,
natechancellor@...il.com, Georgi Djakov <georgi.djakov@...aro.org>,
akashast@...eaurora.org, parashar@...eaurora.org,
Doug Anderson <dianders@...omium.org>,
Linux PM list <linux-pm@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
linux-samsung-soc <linux-samsung-soc@...r.kernel.org>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
linux-tegra@...r.kernel.org,
dri-devel <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 29/31] PM / devfreq: imx-bus: convert to use devm_pm_opp_* API
On Sun, Jan 3, 2021 at 12:58 PM Yangtao Li <tiny.windzz@...il.com> wrote:
>
> Use devm_pm_opp_* API to simplify code.
>
> Signed-off-by: Yangtao Li <tiny.windzz@...il.com>
> ---
> drivers/devfreq/imx-bus.c | 14 +++-----------
> 1 file changed, 3 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/devfreq/imx-bus.c b/drivers/devfreq/imx-bus.c
> index 4f38455ad742..ff26ef049b1b 100644
> --- a/drivers/devfreq/imx-bus.c
> +++ b/drivers/devfreq/imx-bus.c
> @@ -61,7 +61,6 @@ static void imx_bus_exit(struct device *dev)
> {
> struct imx_bus *priv = dev_get_drvdata(dev);
>
> - dev_pm_opp_of_remove_table(dev);
> platform_device_unregister(priv->icc_pdev);
> }
>
> @@ -123,7 +122,7 @@ static int imx_bus_probe(struct platform_device *pdev)
> }
> platform_set_drvdata(pdev, priv);
>
> - ret = dev_pm_opp_of_add_table(dev);
> + ret = devm_pm_opp_of_add_table(dev);
> if (ret < 0) {
> dev_err(dev, "failed to get OPP table\n");
> return ret;
> @@ -141,18 +140,11 @@ static int imx_bus_probe(struct platform_device *pdev)
> if (IS_ERR(priv->devfreq)) {
> ret = PTR_ERR(priv->devfreq);
> dev_err(dev, "failed to add devfreq device: %d\n", ret);
> - goto err;
> + return ret;
> }
>
> - ret = imx_bus_init_icc(dev);
> - if (ret)
> - goto err;
> -
> - return 0;
> + return imx_bus_init_icc(dev);
Remove the unneeded blank line under '.return imx_bus_init_icc(dev);".
> -err:
> - dev_pm_opp_of_remove_table(dev);
> - return ret;
> }
>
> static const struct of_device_id imx_bus_of_match[] = {
> --
> 2.25.1
>
--
Best Regards,
Chanwoo Choi
Powered by blists - more mailing lists