soc: add check condition before enabling irq
propagated from component audio-drivers.lnx.5.0 with same time. However, original 5.10 code includes the change functionally already. Adding check when irq_get_irq_data returns NULL. Original comments: Enable interrupt request only when the interrupt is in disabled state. Change-Id: Ic5048d2fbddf53bd0e42536677bf5d935f4e0683 Signed-off-by: Junkai Cai <junkai@codeaurora.org>
This commit is contained in:
@@ -3286,6 +3286,7 @@ static int swrm_runtime_suspend(struct device *dev)
|
|||||||
struct swr_master *mstr = &swrm->master;
|
struct swr_master *mstr = &swrm->master;
|
||||||
struct swr_device *swr_dev;
|
struct swr_device *swr_dev;
|
||||||
int current_state = 0;
|
int current_state = 0;
|
||||||
|
struct irq_data *irq_data = NULL;
|
||||||
|
|
||||||
trace_printk("%s: pm_runtime: suspend state: %d\n",
|
trace_printk("%s: pm_runtime: suspend state: %d\n",
|
||||||
__func__, swrm->state);
|
__func__, swrm->state);
|
||||||
@@ -3371,10 +3372,10 @@ static int swrm_runtime_suspend(struct device *dev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (swrm->clk_stop_mode0_supp) {
|
if (swrm->clk_stop_mode0_supp) {
|
||||||
if ((swrm->wake_irq > 0) &&
|
if (swrm->wake_irq > 0) {
|
||||||
(irqd_irq_disabled(
|
irq_data = irq_get_irq_data(swrm->wake_irq);
|
||||||
irq_get_irq_data(swrm->wake_irq)))) {
|
if (irq_data && irqd_irq_disabled(irq_data))
|
||||||
enable_irq(swrm->wake_irq);
|
enable_irq(swrm->wake_irq);
|
||||||
} else if (swrm->ipc_wakeup) {
|
} else if (swrm->ipc_wakeup) {
|
||||||
//msm_aud_evt_blocking_notifier_call_chain(
|
//msm_aud_evt_blocking_notifier_call_chain(
|
||||||
// SWR_WAKE_IRQ_REGISTER, (void *)swrm);
|
// SWR_WAKE_IRQ_REGISTER, (void *)swrm);
|
||||||
|
Reference in New Issue
Block a user