Re: [PATCH 1/3] wm97xx-core: Only schedule interrupt handler if not already scheduled

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

 



Hi Mark,

On Mon, Apr 14, 2008 at 06:39:33PM +0100, Mark Brown wrote:
>  static irqreturn_t wm97xx_pen_interrupt(int irq, void *dev_id)
>  {
>  	struct wm97xx *wm = dev_id;
>  
> -	wm->mach_ops->irq_enable(wm, 0);
> -	queue_work(wm->ts_workq, &wm->pen_event_work);
> +	if (!work_pending(&wm->pen_event_work)) {
> +		wm->mach_ops->irq_enable(wm, 0);
> +		queue_work(wm->ts_workq, &wm->pen_event_work);
> +	}

Given the fact that work will not be queued if it is pending anyway
why is this change needed?

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux