Commit 0226db1f authored by Can Guo's avatar Can Guo Committed by Todd Kjos
Browse files

BACKPORT: FROMGIT: scsi: ufs: Refactor ufshcd_init/exit_clk_scaling/gating()

ufshcd_hba_exit() is always called after ufshcd_exit_clk_scaling() and
ufshcd_exit_clk_gating(). Move ufshcd_exit_clk_scaling/gating() to
ufshcd_hba_exit(). Meanwhile, add dedicated functions to initialize
and remove sysfs nodes of clock scaling/gating to make the code more
readable. Overall functionality remains same.

Link: https://lore.kernel.org/r/1611137065-14266-3-git-send-email-cang@codeaurora.org


Reviewed-by: default avatarStanley Chu <stanley.chu@mediatek.com>
Signed-off-by: default avatarCan Guo <cang@codeaurora.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>

Bug: 189417930
(cherry picked from commit 4543d9d7
git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git

 5.14/scsi-queue)
[Can Guo: Resolved minor conflict in ufshcd.c]
Change-Id: I1bbded3f2fd153105f2d0067dd142074c0b2eddd
Signed-off-by: default avatarCan Guo <cang@codeaurora.org>
parent 5ee06e06
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment