mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
FROMGIT: scsi: ufs: Remove the sdev_rpmb member
Since the sdev_rpmb member of struct ufs_hba is only used inside
ufshcd_scsi_add_wlus(), convert it into a local variable.
Link: https://lore.kernel.org/r/20211203231950.193369-5-bvanassche@acm.org
Suggested-by: Jaegeuk Kim <jaegeuk@kernel.org>
Tested-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Asutosh Das <asutoshd@codeaurora.org>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.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>
(cherry picked from commit 59830c095c git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next)
Bug: 204438323
Change-Id: I32b1e9b7e4c517113a2836eba544a94c67223579
Signed-off-by: Bart Van Assche <bvanassche@google.com>
This commit is contained in:
committed by
Bart Van Assche
parent
475c91d6c8
commit
968af1dd93
@@ -7447,7 +7447,7 @@ static inline void ufshcd_blk_pm_runtime_init(struct scsi_device *sdev)
|
||||
static int ufshcd_scsi_add_wlus(struct ufs_hba *hba)
|
||||
{
|
||||
int ret = 0;
|
||||
struct scsi_device *sdev_boot;
|
||||
struct scsi_device *sdev_boot, *sdev_rpmb;
|
||||
|
||||
hba->sdev_ufs_device = __scsi_add_device(hba->host, 0, 0,
|
||||
ufshcd_upiu_wlun_to_scsi_wlun(UFS_UPIU_UFS_DEVICE_WLUN), NULL);
|
||||
@@ -7458,14 +7458,14 @@ static int ufshcd_scsi_add_wlus(struct ufs_hba *hba)
|
||||
}
|
||||
scsi_device_put(hba->sdev_ufs_device);
|
||||
|
||||
hba->sdev_rpmb = __scsi_add_device(hba->host, 0, 0,
|
||||
sdev_rpmb = __scsi_add_device(hba->host, 0, 0,
|
||||
ufshcd_upiu_wlun_to_scsi_wlun(UFS_UPIU_RPMB_WLUN), NULL);
|
||||
if (IS_ERR(hba->sdev_rpmb)) {
|
||||
ret = PTR_ERR(hba->sdev_rpmb);
|
||||
if (IS_ERR(sdev_rpmb)) {
|
||||
ret = PTR_ERR(sdev_rpmb);
|
||||
goto remove_sdev_ufs_device;
|
||||
}
|
||||
ufshcd_blk_pm_runtime_init(hba->sdev_rpmb);
|
||||
scsi_device_put(hba->sdev_rpmb);
|
||||
ufshcd_blk_pm_runtime_init(sdev_rpmb);
|
||||
scsi_device_put(sdev_rpmb);
|
||||
|
||||
sdev_boot = __scsi_add_device(hba->host, 0, 0,
|
||||
ufshcd_upiu_wlun_to_scsi_wlun(UFS_UPIU_BOOT_WLUN), NULL);
|
||||
|
||||
@@ -845,7 +845,6 @@ struct ufs_hba {
|
||||
* "UFS device" W-LU.
|
||||
*/
|
||||
struct scsi_device *sdev_ufs_device;
|
||||
struct scsi_device *sdev_rpmb;
|
||||
|
||||
#ifdef CONFIG_SCSI_UFS_HWMON
|
||||
struct device *hwmon_device;
|
||||
|
||||
Reference in New Issue
Block a user