Skip to content

Commit

Permalink
media: pulse8-cec: schedule next ping after current ping finished
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Dec 16, 2019
1 parent 601282d commit 5870403
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/usb/pulse8-cec/pulse8-cec.c
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,6 @@ static void pulse8_ping_eeprom_work_handler(struct work_struct *work)
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,
Expand All @@ -809,6 +808,7 @@ static void pulse8_ping_eeprom_work_handler(struct work_struct *work)
pulse8->config_pending = false;
}
unlock:
schedule_delayed_work(&pulse8->ping_eeprom_work, PING_PERIOD);
mutex_unlock(&pulse8->lock);
}

Expand Down

0 comments on commit 5870403

Please sign in to comment.