[PATCH v1 01/10] ufs: host: mediatek: Simplify variable usage

peter.wang at mediatek.com peter.wang at mediatek.com
Mon Aug 11 06:11:17 PDT 2025


From: Peter Wang <peter.wang at mediatek.com>

This patch simplifies the code by using 'info->vcc' instead
of 'hba->vreg_info.vcc', as they refer to the same value.
This change improves code readability.

Signed-off-by: Peter Wang <peter.wang at mediatek.com>
---
 drivers/ufs/host/ufs-mediatek.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c
index f902ce08c95a..2be13b982281 100644
--- a/drivers/ufs/host/ufs-mediatek.c
+++ b/drivers/ufs/host/ufs-mediatek.c
@@ -1018,7 +1018,7 @@ static int ufs_mtk_vreg_fix_vcc(struct ufs_hba *hba)
 	struct arm_smccc_res res;
 	int err, ver;
 
-	if (hba->vreg_info.vcc)
+	if (info->vcc)
 		return 0;
 
 	if (of_property_read_bool(np, "mediatek,ufs-vcc-by-num")) {
-- 
2.45.2




More information about the Linux-mediatek mailing list