Commit 056eab38 authored by Vaibhav Gupta's avatar Vaibhav Gupta Committed by Federico Vaga

kernel: fa-calibration: fix compilation error: 'fa undeclared'

In function 'fa_calib_gain_update()', the first argument ('fa') passed to
'from_timer()' is not declared anywhere, and thus the build throws
compilation error.

Fix this by declaring the variable and then defining it by the value
produced by 'from_timer()'. Then we can use the same variable for the
next steps.
Signed-off-by: 's avatarVaibhav Gupta <vaibhav.gupta@cern.ch>
Reviewed-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 34000735
......@@ -339,7 +339,8 @@ static void __fa_calib_gain_update(struct fa_dev *fa)
#if KERNEL_VERSION(4, 15, 0) <= LINUX_VERSION_CODE
static void fa_calib_gain_update(struct timer_list *timer)
{
__fa_calib_gain_update(from_timer(fa, timer, calib_timer));
struct fa_dev *fa = from_timer(fa, timer, calib_timer);
__fa_calib_gain_update(fa);
}
#else
static void fa_calib_gain_update(unsigned long arg)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment