[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3c69b64e-8dcf-91e5-6863-198120c31065@linaro.org>
Date: Mon, 26 Sep 2022 10:03:40 +0200
From: Neil Armstrong <neil.armstrong@...aro.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Andy Gross <agross@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konrad.dybcio@...ainline.org>,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
linux-arm-msm@...r.kernel.org, alsa-devel@...a-project.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/5] slimbus: qcom-ctrl: use
devm_platform_ioremap_resource_byname()
On 23/09/2022 17:57, Krzysztof Kozlowski wrote:
> Simplify the code with devm_platform_ioremap_resource_byname().
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
> ---
> drivers/slimbus/qcom-ctrl.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/slimbus/qcom-ctrl.c b/drivers/slimbus/qcom-ctrl.c
> index bb106eab8ae2..400b7b385a44 100644
> --- a/drivers/slimbus/qcom-ctrl.c
> +++ b/drivers/slimbus/qcom-ctrl.c
> @@ -488,7 +488,6 @@ static int qcom_slim_probe(struct platform_device *pdev)
> {
> struct qcom_slim_ctrl *ctrl;
> struct slim_controller *sctrl;
> - struct resource *slim_mem;
> int ret, ver;
>
> ctrl = devm_kzalloc(&pdev->dev, sizeof(*ctrl), GFP_KERNEL);
> @@ -519,8 +518,7 @@ static int qcom_slim_probe(struct platform_device *pdev)
> platform_set_drvdata(pdev, ctrl);
> dev_set_drvdata(ctrl->dev, ctrl);
>
> - slim_mem = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ctrl");
> - ctrl->base = devm_ioremap_resource(ctrl->dev, slim_mem);
> + ctrl->base = devm_platform_ioremap_resource_byname(pdev, "ctrl");
> if (IS_ERR(ctrl->base))
> return PTR_ERR(ctrl->base);
>
Reviewed-by: Neil Armstrong <neil.armstrong@...aro.org>
Powered by blists - more mailing lists