Merge tag 'zonefs-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal...
[sfrench/cifs-2.6.git] / drivers / ufs / host / ufs-qcom.c
index 480787048e752929d9b255cde85feb9d629292f1..8fde5204e88b06d1d83a055316064d55126c5de5 100644 (file)
@@ -1712,11 +1712,11 @@ static int ufs_qcom_config_esi(struct ufs_hba *hba)
         * 2. Poll queues do not need ESI.
         */
        nr_irqs = hba->nr_hw_queues - hba->nr_queues[HCTX_TYPE_POLL];
-       ret = platform_msi_domain_alloc_irqs(hba->dev, nr_irqs,
-                                            ufs_qcom_write_msi_msg);
+       ret = platform_device_msi_init_and_alloc_irqs(hba->dev, nr_irqs,
+                                                     ufs_qcom_write_msi_msg);
        if (ret) {
                dev_err(hba->dev, "Failed to request Platform MSI %d\n", ret);
-               goto out;
+               return ret;
        }
 
        msi_lock_descs(hba->dev);
@@ -1742,7 +1742,7 @@ static int ufs_qcom_config_esi(struct ufs_hba *hba)
                        devm_free_irq(hba->dev, desc->irq, hba);
                }
                msi_unlock_descs(hba->dev);
-               platform_msi_domain_free_irqs(hba->dev);
+               platform_device_msi_free_irqs_all(hba->dev);
        } else {
                if (host->hw_ver.major == 6 && host->hw_ver.minor == 0 &&
                    host->hw_ver.step == 0)
@@ -1750,11 +1750,8 @@ static int ufs_qcom_config_esi(struct ufs_hba *hba)
                                    FIELD_PREP(ESI_VEC_MASK, MAX_ESI_VEC - 1),
                                    REG_UFS_CFG3);
                ufshcd_mcq_enable_esi(hba);
-       }
-
-out:
-       if (!ret)
                host->esi_enabled = true;
+       }
 
        return ret;
 }
@@ -1821,7 +1818,7 @@ static void ufs_qcom_remove(struct platform_device *pdev)
 
        pm_runtime_get_sync(&(pdev)->dev);
        ufshcd_remove(hba);
-       platform_msi_domain_free_irqs(hba->dev);
+       platform_device_msi_free_irqs_all(hba->dev);
 }
 
 static const struct of_device_id ufs_qcom_of_match[] __maybe_unused = {