Skip to content
Commit 2c432655 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Jonathan Cameron
Browse files

iio: adc: xilinx-ams: Use devm_delayed_work_autocancel() to simplify code



Use devm_delayed_work_autocancel() instead of hand writing it. This is
less verbose and saves a few lines of code.

devm_delayed_work_autocancel() uses devm_add_action() instead of
devm_add_action_or_reset(). This is fine, because if the underlying memory
allocation fails, no work has been scheduled yet. So there is nothing to
undo.

Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: default avatarMichal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/2626e6a057e40cd2271ef0e5f81d12e607bad5b4.1644776929.git.christophe.jaillet@wanadoo.fr


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 2be8795a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment