scsi: ufs-mediatek: Allow unbound mphy
authorStanley Chu <stanley.chu@mediatek.com>
Mon, 1 Jun 2020 10:46:46 +0000 (18:46 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 16 Jun 2020 03:06:41 +0000 (23:06 -0400)
Allow unbound MPHY module since not every MediaTek UFS platform needs
specific MPHY control.

Link: https://lore.kernel.org/r/20200601104646.15436-6-stanley.chu@mediatek.com
Reviewed-by: Peter Wang <peter.wang@mediatek.com>
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufs-mediatek.c

index 1cc7bea1468b0f13da20dd3f8e85a7827060aca3..9a4432c9f7dc998ea0d14c22169d5f4a52fe92c2 100644 (file)
@@ -113,6 +113,12 @@ static int ufs_mtk_bind_mphy(struct ufs_hba *hba)
 
        if (err)
                host->mphy = NULL;
+       /*
+        * Allow unbound mphy because not every platform needs specific
+        * mphy control.
+        */
+       if (err == -ENODEV)
+               err = 0;
 
        return err;
 }