From: Bjorn Andersson Date: Fri, 12 Mar 2021 00:33:16 +0000 (-0800) Subject: soc: qcom: wcnss_ctrl: Introduce local variable "dev" X-Git-Tag: accepted/tizen/unified/20230118.172025~7409^2~4^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ac3f2784200d490558882c83c25a2d38270b02a2;p=platform%2Fkernel%2Flinux-rpi.git soc: qcom: wcnss_ctrl: Introduce local variable "dev" Introduce a local variable to carry the struct device *, to reduce the line lengths in the next patch. Tested-by: Aníbal Limón Link: https://lore.kernel.org/r/20210312003318.3273536-4-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson --- diff --git a/drivers/soc/qcom/wcnss_ctrl.c b/drivers/soc/qcom/wcnss_ctrl.c index 32bed24..358526b9 100644 --- a/drivers/soc/qcom/wcnss_ctrl.c +++ b/drivers/soc/qcom/wcnss_ctrl.c @@ -199,6 +199,7 @@ static int wcnss_download_nv(struct wcnss_ctrl *wcnss, bool *expect_cbc) { struct wcnss_download_nv_req *req; const struct firmware *fw; + struct device *dev = wcnss->dev; const void *data; ssize_t left; int ret; @@ -207,9 +208,9 @@ static int wcnss_download_nv(struct wcnss_ctrl *wcnss, bool *expect_cbc) if (!req) return -ENOMEM; - ret = request_firmware(&fw, NVBIN_FILE, wcnss->dev); + ret = request_firmware(&fw, NVBIN_FILE, dev); if (ret < 0) { - dev_err(wcnss->dev, "Failed to load nv file %s: %d\n", + dev_err(dev, "Failed to load nv file %s: %d\n", NVBIN_FILE, ret); goto free_req; } @@ -235,7 +236,7 @@ static int wcnss_download_nv(struct wcnss_ctrl *wcnss, bool *expect_cbc) ret = rpmsg_send(wcnss->channel, req, req->hdr.len); if (ret < 0) { - dev_err(wcnss->dev, "failed to send smd packet\n"); + dev_err(dev, "failed to send smd packet\n"); goto release_fw; } @@ -248,7 +249,7 @@ static int wcnss_download_nv(struct wcnss_ctrl *wcnss, bool *expect_cbc) ret = wait_for_completion_timeout(&wcnss->ack, WCNSS_REQUEST_TIMEOUT); if (!ret) { - dev_err(wcnss->dev, "timeout waiting for nv upload ack\n"); + dev_err(dev, "timeout waiting for nv upload ack\n"); ret = -ETIMEDOUT; } else { *expect_cbc = wcnss->ack_status == WCNSS_ACK_COLD_BOOTING;