As SCSI host is allocated in ufshcd_platform_init() during platform
drive probe, it is much more appropriate if platform driver calls
ufshcd_dealloc_host() in their own drv->remove() path. How do you
think if I change it as below? If it is OK to you, please ignore my
previous mails.
diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c
index 3d4582e..ea45756 100644
--- a/drivers/scsi/ufs/ufs-qcom.c
+++ b/drivers/scsi/ufs/ufs-qcom.c
@@ -3239,6 +3239,7 @@ static int ufs_qcom_remove(struct platform_device *pdev)
ÂÂÂÂÂÂÂ pm_runtime_get_sync(&(pdev)->dev);
ÂÂÂÂÂÂÂ ufshcd_remove(hba);
+ÂÂÂÂÂÂ ufshcd_dealloc_host(hba);
ÂÂÂÂÂÂÂ return 0;
Â}