mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
UPSTREAM: 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/20220401085050.119323-1-krzysztof.kozlowski@linaro.org
Reviewed-by: Chanho Park <chanho61.park@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Bug: 234653003
(cherry picked from commit 9ad659be37)
Change-Id: Idf97e48b4b9d8a88e06a02681fc8cb3deec748d5
Signed-off-by: Bart Van Assche <bvanassche@google.com>
This commit is contained in:
committed by
Bart Van Assche
parent
262a7bbdcc
commit
d612831d20
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user