diff options
author | Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> | 2023-12-08 12:28:51 +0530 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2023-12-13 23:03:45 -0500 |
commit | 0ae7a02726bca95ee9d17de0ccfcd1de0ff4e429 (patch) | |
tree | 04b3b40eaf3f8ba05e7b204e0091c2d1c24b4fa6 /drivers/ufs/core | |
parent | d42d368647dac42e8e91c10daf3f8261d7996380 (diff) | |
download | linux-0ae7a02726bca95ee9d17de0ccfcd1de0ff4e429.tar.gz linux-0ae7a02726bca95ee9d17de0ccfcd1de0ff4e429.tar.bz2 linux-0ae7a02726bca95ee9d17de0ccfcd1de0ff4e429.zip |
scsi: ufs: qcom: Export ufshcd_{enable/disable}_irq helpers and make use of them
Instead of duplicating the enable/disable IRQ part, let's export the
helpers available in ufshcd driver and make use of them. This also fixes
the possible redundant IRQ disable before asserting reset (when IRQ was
already disabled).
Fixes: 4a791574a0cc ("scsi: ufs: ufs-qcom: Disable interrupt in reset path")
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20231208065902.11006-7-manivannan.sadhasivam@linaro.org
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sa8775p-ride
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/ufs/core')
-rw-r--r-- | drivers/ufs/core/ufshcd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index 8b1031fb0a44..671facc73921 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -289,21 +289,23 @@ static void ufshcd_wb_toggle_buf_flush_during_h8(struct ufs_hba *hba, static void ufshcd_hba_vreg_set_lpm(struct ufs_hba *hba); static void ufshcd_hba_vreg_set_hpm(struct ufs_hba *hba); -static inline void ufshcd_enable_irq(struct ufs_hba *hba) +void ufshcd_enable_irq(struct ufs_hba *hba) { if (!hba->is_irq_enabled) { enable_irq(hba->irq); hba->is_irq_enabled = true; } } +EXPORT_SYMBOL_GPL(ufshcd_enable_irq); -static inline void ufshcd_disable_irq(struct ufs_hba *hba) +void ufshcd_disable_irq(struct ufs_hba *hba) { if (hba->is_irq_enabled) { disable_irq(hba->irq); hba->is_irq_enabled = false; } } +EXPORT_SYMBOL_GPL(ufshcd_disable_irq); static void ufshcd_configure_wb(struct ufs_hba *hba) { |