diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2016-12-25 12:30:41 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2016-12-25 17:21:22 +0100 |
commit | 8b0e195314fabd58a331c4f7b6db75a1565535d7 (patch) | |
tree | 6ff9d2d9388406b8447b09b6a4037795142172de /drivers/usb/host | |
parent | 2456e855354415bfaeb7badaa14e11b3e02c8466 (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/usb/host')
-rw-r--r-- | drivers/usb/host/ehci-timer.c | 3 | ||||
-rw-r--r-- | drivers/usb/host/fotg210-hcd.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/host/ehci-timer.c b/drivers/usb/host/ehci-timer.c index 262e10cacc8c..3893b5bafd87 100644 --- a/drivers/usb/host/ehci-timer.c +++ b/drivers/usb/host/ehci-timer.c @@ -88,8 +88,7 @@ static void ehci_enable_event(struct ehci_hcd *ehci, unsigned event, ktime_t *timeout = &ehci->hr_timeouts[event]; if (resched) - *timeout = ktime_add(ktime_get(), - ktime_set(0, event_delays_ns[event])); + *timeout = ktime_add(ktime_get(), event_delays_ns[event]); ehci->enabled_hrtimer_events |= (1 << event); /* Track only the lowest-numbered pending event */ diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c index 4dda56ef06cd..9d0b0518290a 100644 --- a/drivers/usb/host/fotg210-hcd.c +++ b/drivers/usb/host/fotg210-hcd.c @@ -1080,8 +1080,7 @@ static void fotg210_enable_event(struct fotg210_hcd *fotg210, unsigned event, ktime_t *timeout = &fotg210->hr_timeouts[event]; if (resched) - *timeout = ktime_add(ktime_get(), - ktime_set(0, event_delays_ns[event])); + *timeout = ktime_add(ktime_get(), event_delays_ns[event]); fotg210->enabled_hrtimer_events |= (1 << event); /* Track only the lowest-numbered pending event */ |