summaryrefslogtreecommitdiff
path: root/drivers/scsi/ufs/ufshcd.h
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2022-04-19 15:57:59 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2022-04-25 23:23:03 -0400
commite2106584d0110b2613cc7de3bf013fa9e070bfd1 (patch)
tree2dd31c110b3d4a5f10e7dc89cf588f9942102202 /drivers/scsi/ufs/ufshcd.h
parentb4ade33b0d168334177466488cd7aa03b1569a86 (diff)
scsi: ufs: Rename sdev_ufs_device into ufs_device_wlun
The new name reflects the role of this member variable better: a WLUN through which the power mode of the UFS device is controlled. Link: https://lore.kernel.org/r/20220419225811.4127248-17-bvanassche@acm.org Tested-by: Bean Huo <beanhuo@micron.com> Reviewed-by: Avri Altman <avri.altman@wdc.com> Reviewed-by: Bean Huo <beanhuo@micron.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ufs/ufshcd.h')
-rw-r--r--drivers/scsi/ufs/ufshcd.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h
index a6c12869b2db..e9cdfbe64c09 100644
--- a/drivers/scsi/ufs/ufshcd.h
+++ b/drivers/scsi/ufs/ufshcd.h
@@ -732,6 +732,7 @@ struct ufs_hba_monitor {
* @utmrdl_dma_addr: UTMRDL DMA address
* @host: Scsi_Host instance of the driver
* @dev: device handle
+ * @ufs_device_wlun: WLUN that controls the entire UFS device.
* @lrb: local reference block
* @outstanding_tasks: Bits representing outstanding task requests
* @outstanding_lock: Protects @outstanding_reqs.
@@ -799,11 +800,7 @@ struct ufs_hba {
struct Scsi_Host *host;
struct device *dev;
- /*
- * This field is to keep a reference to "scsi_device" corresponding to
- * "UFS device" W-LU.
- */
- struct scsi_device *sdev_ufs_device;
+ struct scsi_device *ufs_device_wlun;
#ifdef CONFIG_SCSI_UFS_HWMON
struct device *hwmon_device;
@@ -1405,27 +1402,27 @@ static inline int ufshcd_update_ee_usr_mask(struct ufs_hba *hba,
static inline int ufshcd_rpm_get_sync(struct ufs_hba *hba)
{
- return pm_runtime_get_sync(&hba->sdev_ufs_device->sdev_gendev);
+ return pm_runtime_get_sync(&hba->ufs_device_wlun->sdev_gendev);
}
static inline int ufshcd_rpm_put_sync(struct ufs_hba *hba)
{
- return pm_runtime_put_sync(&hba->sdev_ufs_device->sdev_gendev);
+ return pm_runtime_put_sync(&hba->ufs_device_wlun->sdev_gendev);
}
static inline void ufshcd_rpm_get_noresume(struct ufs_hba *hba)
{
- pm_runtime_get_noresume(&hba->sdev_ufs_device->sdev_gendev);
+ pm_runtime_get_noresume(&hba->ufs_device_wlun->sdev_gendev);
}
static inline int ufshcd_rpm_resume(struct ufs_hba *hba)
{
- return pm_runtime_resume(&hba->sdev_ufs_device->sdev_gendev);
+ return pm_runtime_resume(&hba->ufs_device_wlun->sdev_gendev);
}
static inline int ufshcd_rpm_put(struct ufs_hba *hba)
{
- return pm_runtime_put(&hba->sdev_ufs_device->sdev_gendev);
+ return pm_runtime_put(&hba->ufs_device_wlun->sdev_gendev);
}
#endif /* End of Header */