Commit bc1026a3 authored by Alessandro Rubini's avatar Alessandro Rubini

backport: avoid timespec_add, which appeared in 2.6.36

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent b0e9cfac
...@@ -396,10 +396,10 @@ static void wrn_trig_next_pulse(struct wrn_drvdata *drvdata,int ch, ...@@ -396,10 +396,10 @@ static void wrn_trig_next_pulse(struct wrn_drvdata *drvdata,int ch,
struct timespec newts; struct timespec newts;
if (c->target_channel == ch) { if (c->target_channel == ch) {
c->prevts = timespec_add(c->prevts, c->delay); c->prevts = timespec_add_safe(c->prevts, c->delay);
newts = c->prevts; newts = c->prevts;
} else { } else {
newts = timespec_add(*ts, c->delay); newts = timespec_add_safe(*ts, c->delay);
} }
__wrn_new_pulse(drvdata, c->target_channel, &newts); __wrn_new_pulse(drvdata, c->target_channel, &newts);
......
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