Commit 5213a2da authored by Alexander Shishkin's avatar Alexander Shishkin Committed by Greg Kroah-Hartman

stm class: sys-t: Fix the use of time_after()

commit 283f87c0d5d32b4a5c22636adc559bca82196ed3 upstream.

The operands of time_after() are in a wrong order in both instances in
the sys-t driver. Fix that.
Signed-off-by: default avatarAlexander Shishkin <[email protected]>
Reviewed-by: default avatarAndy Shevchenko <[email protected]>
Fixes: 39f10239 ("stm class: p_sys-t: Add support for CLOCKSYNC packets")
Fixes: d69d5e83 ("stm class: Add MIPI SyS-T protocol support")
Cc: [email protected] # v4.20+
Link: https://lore.kernel.org/r/[email protected]Signed-off-by: default avatarGreg Kroah-Hartman <[email protected]>
parent 32bacc95
......@@ -238,7 +238,7 @@ static struct configfs_attribute *sys_t_policy_attrs[] = {
static inline bool sys_t_need_ts(struct sys_t_output *op)
{
if (op->node.ts_interval &&
time_after(op->ts_jiffies + op->node.ts_interval, jiffies)) {
time_after(jiffies, op->ts_jiffies + op->node.ts_interval)) {
op->ts_jiffies = jiffies;
return true;
......@@ -250,8 +250,8 @@ static inline bool sys_t_need_ts(struct sys_t_output *op)
static bool sys_t_need_clock_sync(struct sys_t_output *op)
{
if (op->node.clocksync_interval &&
time_after(op->clocksync_jiffies + op->node.clocksync_interval,
jiffies)) {
time_after(jiffies,
op->clocksync_jiffies + op->node.clocksync_interval)) {
op->clocksync_jiffies = jiffies;
return true;
......
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