Re: [PATCH 4/8] ASoC: rt5640: Fix sleep in atomic context

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 22, 2023 at 05:04:12PM +0530, Sameer Pujar wrote:

> The IRQ handler rt5640_irq() runs in interrupt context and can sleep
> during cancel_delayed_work_sync().

> Fix this by running IRQ handler, rt5640_irq(), in thread context.
> Hence replace request_irq() calls with devm_request_threaded_irq().

> -		ret = request_irq(rt5640->jd_gpio_irq, rt5640_jd_gpio_irq,
> -				  IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
> -				  "rt5640-jd-gpio", rt5640);
> +		ret = devm_request_threaded_irq(component->dev,
> +				rt5640->jd_gpio_irq,
> +				NULL, rt5640_jd_gpio_irq,
> +				IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
> +				"rt5640-jd-gpio", rt5640);

This is rt5640_jd_gpio_irq() which just does a queue_delayed_work() not
a cancel.  Why is it being changed?

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux