scsi: ufs: don't free irq in suspend

If we had called the pm_qos_add_request() with PM QoS request type set to
PM_QOS_REQ_AFFINE_IRQ then freeing up the irq makes the free_irq() to
print out warning with call stack. We don't really need to free up irq
during suspend, disabling it during suspend and reenabling it during
resume should be good enough and that's how it was done on 3.10 kernel
as well.

Change-Id: I58379a05e1f9d5f18b46394d64bdf6f106afa963
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
This commit is contained in:
Subhash Jadavani 2015-07-15 16:47:16 -07:00 committed by David Keitel
parent bb0a6f5728
commit e64871e61d

View file

@ -377,26 +377,18 @@ static inline bool ufshcd_valid_tag(struct ufs_hba *hba, int tag)
return tag >= 0 && tag < hba->nutrs; return tag >= 0 && tag < hba->nutrs;
} }
static inline int ufshcd_enable_irq(struct ufs_hba *hba) static inline void ufshcd_enable_irq(struct ufs_hba *hba)
{ {
int ret = 0;
if (!hba->is_irq_enabled) { if (!hba->is_irq_enabled) {
ret = request_irq(hba->irq, ufshcd_intr, IRQF_SHARED, UFSHCD, enable_irq(hba->irq);
hba);
if (ret)
dev_err(hba->dev, "%s: request_irq failed, ret=%d\n",
__func__, ret);
hba->is_irq_enabled = true; hba->is_irq_enabled = true;
} }
return ret;
} }
static inline void ufshcd_disable_irq(struct ufs_hba *hba) static inline void ufshcd_disable_irq(struct ufs_hba *hba)
{ {
if (hba->is_irq_enabled) { if (hba->is_irq_enabled) {
free_irq(hba->irq, hba); disable_irq(hba->irq);
hba->is_irq_enabled = false; hba->is_irq_enabled = false;
} }
} }
@ -7666,9 +7658,7 @@ static int ufshcd_resume(struct ufs_hba *hba, enum ufs_pm_op pm_op)
goto out; goto out;
/* enable the host irq as host controller would be active soon */ /* enable the host irq as host controller would be active soon */
ret = ufshcd_enable_irq(hba); ufshcd_enable_irq(hba);
if (ret)
goto disable_irq_and_vops_clks;
ret = ufshcd_vreg_set_hpm(hba); ret = ufshcd_vreg_set_hpm(hba);
if (ret) if (ret)