@@ -7217,16 +7217,6 @@ static void ufshcd_set_active_icc_lvl(struct ufs_hba *hba)
kfree(desc_buf);
}
-static inline void ufshcd_blk_pm_runtime_init(struct scsi_device *sdev)
-{
- scsi_autopm_get_device(sdev);
- blk_pm_runtime_init(sdev->request_queue, &sdev->sdev_gendev);
- if (sdev->rpm_autosuspend)
- pm_runtime_set_autosuspend_delay(&sdev->sdev_gendev,
- RPM_AUTOSUSPEND_DELAY_MS);
- scsi_autopm_put_device(sdev);
-}
-
/**
* ufshcd_scsi_add_wlus - Adds required W-LUs
* @hba: per-adapter instance
@@ -7265,7 +7255,6 @@ static int ufshcd_scsi_add_wlus(struct ufs_hba *hba)
hba->sdev_ufs_device = NULL;
goto out;
}
- ufshcd_blk_pm_runtime_init(hba->sdev_ufs_device);
scsi_device_put(hba->sdev_ufs_device);
hba->sdev_rpmb = __scsi_add_device(hba->host, 0, 0,
@@ -7274,17 +7263,14 @@ static int ufshcd_scsi_add_wlus(struct ufs_hba *hba)
ret = PTR_ERR(hba->sdev_rpmb);
goto remove_sdev_ufs_device;
}
- ufshcd_blk_pm_runtime_init(hba->sdev_rpmb);
scsi_device_put(hba->sdev_rpmb);
sdev_boot = __scsi_add_device(hba->host, 0, 0,
ufshcd_upiu_wlun_to_scsi_wlun(UFS_UPIU_BOOT_WLUN), NULL);
- if (IS_ERR(sdev_boot)) {
+ if (IS_ERR(sdev_boot))
dev_err(hba->dev, "%s: BOOT WLUN not found\n", __func__);
- } else {
- ufshcd_blk_pm_runtime_init(sdev_boot);
+ else
scsi_device_put(sdev_boot);
- }
goto out;
remove_sdev_ufs_device: