summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/ec_bhf.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2016-12-25 12:30:41 +0100
committerThomas Gleixner <tglx@linutronix.de>2016-12-25 17:21:22 +0100
commit8b0e195314fabd58a331c4f7b6db75a1565535d7 (patch)
tree6ff9d2d9388406b8447b09b6a4037795142172de /drivers/net/ethernet/ec_bhf.c
parent2456e855354415bfaeb7badaa14e11b3e02c8466 (diff)
ktime: Cleanup ktime_set() usage
ktime_set(S,N) was required for the timespec storage type and is still useful for situations where a Seconds and Nanoseconds part of a time value needs to be converted. For anything where the Seconds argument is 0, this is pointless and can be replaced with a simple assignment. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org>
Diffstat (limited to 'drivers/net/ethernet/ec_bhf.c')
-rw-r--r--drivers/net/ethernet/ec_bhf.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/ec_bhf.c b/drivers/net/ethernet/ec_bhf.c
index 57650953ff83..7bf78a0d322c 100644
--- a/drivers/net/ethernet/ec_bhf.c
+++ b/drivers/net/ethernet/ec_bhf.c
@@ -253,7 +253,7 @@ static enum hrtimer_restart ec_bhf_timer_fun(struct hrtimer *timer)
if (!netif_running(priv->net_dev))
return HRTIMER_NORESTART;
- hrtimer_forward_now(timer, ktime_set(0, polling_frequency));
+ hrtimer_forward_now(timer, polling_frequency);
return HRTIMER_RESTART;
}
@@ -427,8 +427,7 @@ static int ec_bhf_open(struct net_device *net_dev)
hrtimer_init(&priv->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
priv->hrtimer.function = ec_bhf_timer_fun;
- hrtimer_start(&priv->hrtimer, ktime_set(0, polling_frequency),
- HRTIMER_MODE_REL);
+ hrtimer_start(&priv->hrtimer, polling_frequency, HRTIMER_MODE_REL);
return 0;