summaryrefslogtreecommitdiffstats
path: root/drivers/net/can/softing/softing_fw.c
diff options
context:
space:
mode:
authorThomas Gleixner2016-12-25 12:30:41 +0100
committerThomas Gleixner2016-12-25 17:21:22 +0100
commit8b0e195314fabd58a331c4f7b6db75a1565535d7 (patch)
tree6ff9d2d9388406b8447b09b6a4037795142172de /drivers/net/can/softing/softing_fw.c
parentktime: Get rid of the union (diff)
downloadkernel-qcow2-linux-8b0e195314fabd58a331c4f7b6db75a1565535d7.tar.gz
kernel-qcow2-linux-8b0e195314fabd58a331c4f7b6db75a1565535d7.tar.xz
kernel-qcow2-linux-8b0e195314fabd58a331c4f7b6db75a1565535d7.zip
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/can/softing/softing_fw.c')
-rw-r--r--drivers/net/can/softing/softing_fw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/can/softing/softing_fw.c b/drivers/net/can/softing/softing_fw.c
index 52fe50725d74..4063215c9b54 100644
--- a/drivers/net/can/softing/softing_fw.c
+++ b/drivers/net/can/softing/softing_fw.c
@@ -390,7 +390,7 @@ static void softing_initialize_timestamp(struct softing *card)
ovf = 0x100000000ULL * 16;
do_div(ovf, card->pdat->freq ?: 16);
- card->ts_overflow = ktime_add_us(ktime_set(0, 0), ovf);
+ card->ts_overflow = ktime_add_us(0, ovf);
}
ktime_t softing_raw2ktime(struct softing *card, u32 raw)
@@ -647,7 +647,7 @@ int softing_startstop(struct net_device *dev, int up)
open_candev(netdev);
if (dev != netdev) {
/* notify other busses on the restart */
- softing_netdev_rx(netdev, &msg, ktime_set(0, 0));
+ softing_netdev_rx(netdev, &msg, 0);
++priv->can.can_stats.restarts;
}
netif_wake_queue(netdev);