lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <CAFp+6iEgiv0KJo+ikR_jyakc2dGjetiArJSvC4d5JFO0ZnO7-Q@mail.gmail.com> Date: Wed, 20 Dec 2017 08:07:14 +0530 From: Vivek Gautam <vivek.gautam@...eaurora.org> To: Manu Gautam <mgautam@...eaurora.org> Cc: Kishon Vijay Abraham I <kishon@...com>, linux-arm-msm <linux-arm-msm@...r.kernel.org>, Linux USB Mailing List <linux-usb@...r.kernel.org>, Varadarajan Narayanan <varada@...eaurora.org>, Wei Yongjun <weiyongjun1@...wei.com>, Fengguang Wu <fengguang.wu@...el.com>, "open list:GENERIC PHY FRAMEWORK" <linux-kernel@...r.kernel.org> Subject: Re: [PATCH v3 02/16] phy: qcom-qmp: Adapt to clk_bulk_* APIs Hi Manu, On Tue, Nov 21, 2017 at 2:53 PM, Manu Gautam <mgautam@...eaurora.org> wrote: > From: Vivek Gautam <vivek.gautam@...eaurora.org> > > Move from using array of clocks to clk_bulk_* APIs that > are available now. > > Signed-off-by: Vivek Gautam <vivek.gautam@...eaurora.org> > Signed-off-by: Manu Gautam <mgautam@...eaurora.org> > --- > drivers/phy/qualcomm/phy-qcom-qmp.c | 50 ++++++++++++------------------------- > 1 file changed, 16 insertions(+), 34 deletions(-) > > diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c b/drivers/phy/qualcomm/phy-qcom-qmp.c > index 76acaec..90794dd 100644 > --- a/drivers/phy/qualcomm/phy-qcom-qmp.c > +++ b/drivers/phy/qualcomm/phy-qcom-qmp.c [snip] > @@ -998,29 +992,17 @@ static int qcom_qmp_phy_reset_init(struct device *dev) > static int qcom_qmp_phy_clk_init(struct device *dev) > { > struct qcom_qmp *qmp = dev_get_drvdata(dev); > - int ret, i; > + int num = qmp->cfg->num_clks; > + int i; > > - qmp->clks = devm_kcalloc(dev, qmp->cfg->num_clks, > - sizeof(*qmp->clks), GFP_KERNEL); > + qmp->clks = devm_kcalloc(dev, num, sizeof(*qmp->clks), GFP_KERNEL); > if (!qmp->clks) > return -ENOMEM; > > - for (i = 0; i < qmp->cfg->num_clks; i++) { > - struct clk *_clk; > - const char *name = qmp->cfg->clk_list[i]; > - > - _clk = devm_clk_get(dev, name); > - if (IS_ERR(_clk)) { > - ret = PTR_ERR(_clk); > - if (ret != -EPROBE_DEFER) > - dev_err(dev, "failed to get %s clk, %d\n", > - name, ret); > - return ret; > - } > - qmp->clks[i] = _clk; > - } > + for (i = 0; i < num; i++) > + qmp->clks->id = qmp->cfg->clk_list[i]; I think i missed this one while rebasing. We need to use index with this. Should be: qmp->clks[i]->id = qmp->cfg->clk_list[i]; Regards Vivek -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Powered by blists - more mailing lists