Re: [PATCH 29/31] PM / devfreq: imx-bus: convert to use devm_pm_opp_* API
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [PATCH 29/31] PM / devfreq: imx-bus: convert to use devm_pm_opp_* API
- From: Chanwoo Choi <cwchoi00@xxxxxxxxx>
- Date: Tue, 5 Jan 2021 13:20:24 +0900
- Cc: MyungJoo Ham <myungjoo.ham@xxxxxxxxxxx>, Kyungmin Park <kyungmin.park@xxxxxxxxxxx>, Chanwoo Choi <cw00.choi@xxxxxxxxxxx>, Krzysztof Kozlowski <krzk@xxxxxxxxxx>, Shawn Guo <shawnguo@xxxxxxxxxx>, s.hauer@xxxxxxxxxxxxxx, kernel@xxxxxxxxxxxxxx, festevam@xxxxxxxxx, dl-linux-imx <linux-imx@xxxxxxx>, Dmitry Osipenko <digetx@xxxxxxxxx>, Thierry Reding <thierry.reding@xxxxxxxxx>, Jonathan Hunter <jonathanh@xxxxxxxxxx>, yuq825@xxxxxxxxx, David Airlie <airlied@xxxxxxxx>, daniel@xxxxxxxx, robdclark@xxxxxxxxx, sean@xxxxxxxxxx, Rob Herring <robh@xxxxxxxxxx>, tomeu.vizoso@xxxxxxxxxxxxx, steven.price@xxxxxxx, alyssa.rosenzweig@xxxxxxxxxxxxx, stanimir.varbanov@xxxxxxxxxx, agross@xxxxxxxxxx, Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>, mchehab@xxxxxxxxxx, Lukasz Luba <lukasz.luba@xxxxxxx>, adrian.hunter@xxxxxxxxx, Ulf Hansson <ulf.hansson@xxxxxxxxxx>, Viresh Kumar <vireshk@xxxxxxxxxx>, Nishanth Menon <nm@xxxxxx>, Stephen Boyd <sboyd@xxxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>, Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>, jirislaby@xxxxxxxxxx, "Rafael J. Wysocki" <rjw@xxxxxxxxxxxxx>, jcrouse@xxxxxxxxxxxxxx, hoegsberg@xxxxxxxxxx, eric@xxxxxxxxxxxxxxxxxx, tzimmermann@xxxxxxx, marijn.suijten@xxxxxxxxxxxxxx, gustavoars@xxxxxxxxxx, emil.velikov@xxxxxxxxxxxxx, jonathan@xxxxxxxx, akhilpo@xxxxxxxxxxxxxx, smasetty@xxxxxxxxxxxxxx, airlied@xxxxxxxxxx, masneyb@xxxxxxxxxxxxx, kalyan_t@xxxxxxxxxxxxxx, tanmay@xxxxxxxxxxxxxx, ddavenport@xxxxxxxxxxxx, jsanka@xxxxxxxxxxxxxx, rnayak@xxxxxxxxxxxxxx, tongtiangen@xxxxxxxxxx, miaoqinglang@xxxxxxxxxx, khsieh@xxxxxxxxxxxxxx, abhinavk@xxxxxxxxxxxxxx, chandanu@xxxxxxxxxxxxxx, Guenter Roeck <groeck@xxxxxxxxxxxx>, varar@xxxxxxxxxxxxxx, Matthias Kaehlcke <mka@xxxxxxxxxxxx>, harigovi@xxxxxxxxxxxxxx, rikard.falkeborn@xxxxxxxxx, natechancellor@xxxxxxxxx, Georgi Djakov <georgi.djakov@xxxxxxxxxx>, akashast@xxxxxxxxxxxxxx, parashar@xxxxxxxxxxxxxx, Doug Anderson <dianders@xxxxxxxxxxxx>, Linux PM list <linux-pm@xxxxxxxxxxxxxxx>, linux-kernel <linux-kernel@xxxxxxxxxxxxxxx>, linux-samsung-soc <linux-samsung-soc@xxxxxxxxxxxxxxx>, linux-arm-kernel <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, linux-tegra@xxxxxxxxxxxxxxx, dri-devel <dri-devel@xxxxxxxxxxxxxxxxxxxxx>, lima@xxxxxxxxxxxxxxxxxxxxx, linux-arm-msm@xxxxxxxxxxxxxxx, freedreno@xxxxxxxxxxxxxxxxxxxxx, linux-media@xxxxxxxxxxxxxxx, linux-mmc@xxxxxxxxxxxxxxx, linux-spi@xxxxxxxxxxxxxxx, linux-serial@xxxxxxxxxxxxxxx
- In-reply-to: <20210103035605.23973-1-tiny.windzz@gmail.com>
- References: <20210103035605.23973-1-tiny.windzz@gmail.com>
- Reply-to: cwchoi00@xxxxxxxxx
On Sun, Jan 3, 2021 at 12:58 PM Yangtao Li <tiny.windzz@xxxxxxxxx> wrote:
>
> Use devm_pm_opp_* API to simplify code.
>
> Signed-off-by: Yangtao Li <tiny.windzz@xxxxxxxxx>
> ---
> 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
[Index of Archives]
[Linux Kernel]
[Linux ARM (vger)]
[Linux ARM MSM]
[Linux Omap]
[Linux Arm]
[Linux Tegra]
[Fedora ARM]
[Linux for Samsung SOC]
[eCos]
[Linux Fastboot]
[Gcc Help]
[Git]
[DCCP]
[IETF Announce]
[Security]
[Linux MIPS]
[Yosemite Campsites]
|