[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230713040142.3nsrzezvi2hsp52e@vireshk-i7>
Date: Thu, 13 Jul 2023 09:31:42 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
Cc: vireshk@...nel.org, nm@...com, sboyd@...nel.org,
myungjoo.ham@...sung.com, kyungmin.park@...sung.com,
cw00.choi@...sung.com, andersson@...nel.org,
konrad.dybcio@...aro.org, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
quic_asutoshd@...cinc.com, quic_cang@...cinc.com,
quic_nitirawa@...cinc.com, quic_narepall@...cinc.com,
quic_bhaskarv@...cinc.com, quic_richardp@...cinc.com,
quic_nguyenb@...cinc.com, quic_ziqichen@...cinc.com,
bmasney@...hat.com, krzysztof.kozlowski@...aro.org
Subject: Re: [PATCH 10/14] scsi: ufs: core: Add OPP support for scaling
clocks and regulators
On 12-07-23, 16:02, Manivannan Sadhasivam wrote:
> +static int ufshcd_opp_set_rate(struct ufs_hba *hba, unsigned long freq)
> +{
> + struct dev_pm_opp *opp;
> +
> + opp = dev_pm_opp_find_freq_floor_indexed(hba->dev,
> + &freq, 0);
> + if (IS_ERR(opp))
> + return PTR_ERR(opp);
> +
> + dev_pm_opp_put(opp);
You can't free the OPP while you are still using it :)
> +
> + return dev_pm_opp_set_opp(hba->dev, opp);
> +}
--
viresh
Powered by blists - more mailing lists