Don't schedule the next ping before the current ping is
sent, schedule it after.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
container_of(work, struct pulse8, ping_eeprom_work.work);
u8 cmd;
- schedule_delayed_work(&pulse8->ping_eeprom_work, PING_PERIOD);
mutex_lock(&pulse8->lock);
cmd = MSGCODE_PING;
pulse8_send_and_wait(pulse8, &cmd, 1,
pulse8->config_pending = false;
}
unlock:
+ schedule_delayed_work(&pulse8->ping_eeprom_work, PING_PERIOD);
mutex_unlock(&pulse8->lock);
}