To fit its new purpose as a more general purpose sleeping lock for the host. Signed-off-by: Adrian Hunter <adrian.hunter@xxxxxxxxx> --- drivers/scsi/ufs/ufshcd.c | 2 +- drivers/scsi/ufs/ufshcd.h | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 350ecfd90306..3912b74d50ae 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -9630,7 +9630,7 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq) /* Initialize mutex for exception event control */ mutex_init(&hba->ee_ctrl_mutex); - init_rwsem(&hba->clk_scaling_lock); + init_rwsem(&hba->host_rw_sem); ufshcd_init_clk_gating(hba); diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h index 9b1ef272fb3c..495e1c0afae3 100644 --- a/drivers/scsi/ufs/ufshcd.h +++ b/drivers/scsi/ufs/ufshcd.h @@ -897,7 +897,7 @@ struct ufs_hba { enum bkops_status urgent_bkops_lvl; bool is_urgent_bkops_lvl_checked; - struct rw_semaphore clk_scaling_lock; + struct rw_semaphore host_rw_sem; unsigned char desc_size[QUERY_DESC_IDN_MAX]; atomic_t scsi_block_reqs_cnt; @@ -1420,32 +1420,32 @@ static inline int ufshcd_rpmb_rpm_put(struct ufs_hba *hba) static inline void ufshcd_down_read(struct ufs_hba *hba) { - down_read(&hba->clk_scaling_lock); + down_read(&hba->host_rw_sem); } static inline void ufshcd_up_read(struct ufs_hba *hba) { - up_read(&hba->clk_scaling_lock); + up_read(&hba->host_rw_sem); } static inline int ufshcd_down_read_trylock(struct ufs_hba *hba) { - return down_read_trylock(&hba->clk_scaling_lock); + return down_read_trylock(&hba->host_rw_sem); } static inline void ufshcd_down_write(struct ufs_hba *hba) { - down_write(&hba->clk_scaling_lock); + down_write(&hba->host_rw_sem); } static inline void ufshcd_up_write(struct ufs_hba *hba) { - up_write(&hba->clk_scaling_lock); + up_write(&hba->host_rw_sem); } static inline void ufshcd_downgrade_write(struct ufs_hba *hba) { - downgrade_write(&hba->clk_scaling_lock); + downgrade_write(&hba->host_rw_sem); } #endif /* End of Header */ -- 2.25.1