aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <[email protected]>2022-04-01 10:50:50 +0200
committerMartin K. Petersen <[email protected]>2022-04-06 22:59:45 -0400
commit9ad659be37612b036fdbfb535d5f831901f37db2 (patch)
tree7aa95e430d27d92e0d7c4df1fc0e9db9991d5b08
parent80890c5ea068661d6fe4a34beb362ca0f2c49c90 (diff)
scsi: ufs: ufshcd-pltfrm: Simplify pdev->dev usage
The 'struct device' pointer is already cached as a local variable in ufshcd_pltfrm_init(), so use it. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Chanho Park <[email protected]> Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
-rw-r--r--drivers/scsi/ufs/ufshcd-pltfrm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b/drivers/scsi/ufs/ufshcd-pltfrm.c
index 87975d1a21c8..cca4b2181a81 100644
--- a/drivers/scsi/ufs/ufshcd-pltfrm.c
+++ b/drivers/scsi/ufs/ufshcd-pltfrm.c
@@ -341,7 +341,7 @@ int ufshcd_pltfrm_init(struct platform_device *pdev,
err = ufshcd_alloc_host(dev, &hba);
if (err) {
- dev_err(&pdev->dev, "Allocation failed\n");
+ dev_err(dev, "Allocation failed\n");
goto out;
}
@@ -349,13 +349,13 @@ int ufshcd_pltfrm_init(struct platform_device *pdev,
err = ufshcd_parse_clock_info(hba);
if (err) {
- dev_err(&pdev->dev, "%s: clock parse failed %d\n",
+ dev_err(dev, "%s: clock parse failed %d\n",
__func__, err);
goto dealloc_host;
}
err = ufshcd_parse_regulator_info(hba);
if (err) {
- dev_err(&pdev->dev, "%s: regulator init failed %d\n",
+ dev_err(dev, "%s: regulator init failed %d\n",
__func__, err);
goto dealloc_host;
}
@@ -368,8 +368,8 @@ int ufshcd_pltfrm_init(struct platform_device *pdev,
goto dealloc_host;
}
- pm_runtime_set_active(&pdev->dev);
- pm_runtime_enable(&pdev->dev);
+ pm_runtime_set_active(dev);
+ pm_runtime_enable(dev);
return 0;