Message ID | 20240416102348.614-4-avri.altman@wdc.com |
---|---|
State | New |
Headers | show |
Series | simplify ufshcd with the guard() macro | expand |
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index 92ac6a358365..3c62b69bbd52 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -6309,10 +6309,9 @@ void ufshcd_schedule_eh_work(struct ufs_hba *hba) static void ufshcd_force_error_recovery(struct ufs_hba *hba) { - spin_lock_irq(hba->host->host_lock); + guard(spinlock_irq)(hba->host->host_lock); hba->force_reset = true; ufshcd_schedule_eh_work(hba); - spin_unlock_irq(hba->host->host_lock); } static void ufshcd_clk_scaling_allow(struct ufs_hba *hba, bool allow)
Replace open-coded handling with cleanup.h guard(spinlock_irq). Signed-off-by: Avri Altman <avri.altman@wdc.com> --- drivers/ufs/core/ufshcd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)