Re: [PATCH V4 06/10] input: touchscreen: ili210x: Convert to devm IRQ

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

 



Hi Marek,

On Wed, Jan 30, 2019 at 07:48:31AM +0100, Marek Vasut wrote:
> +	error = devm_request_irq(dev, client->irq, ili210x_irq, 0,
> +				 client->name, priv);
>  	if (error) {
>  		dev_err(dev, "Unable to request touchscreen IRQ, err: %d\n",
>  			error);
> -		goto err_free_mem;
> +		return error;
>  	}
>  
> +	error = devm_add_action(dev, ili210x_irq_teardown, priv);
> +	if (error)
> +		return error;

Because you want the work be canceled after interrupt is freed, you want
to register the action before requesting irq (devm is unwound on the
order opposite of initialization).

I changed it to ili210x_cancel_work and moved before call to
devm_request_irq().

Thanks.

-- 
Dmitry



[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