diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-11-07 11:39:57 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-11-07 15:34:08 +0100 |
commit | 6c51441cd0710330ccdb8dd0288e5316256d1c8e (patch) | |
tree | 82f7475d202cd09c0beabac8455b1c90afc04d36 /drivers/usb/usbip/vudc_sysfs.c | |
parent | 15081e85cca45e495144eb0c108926e629fde486 (diff) | |
download | talos-obmc-linux-6c51441cd0710330ccdb8dd0288e5316256d1c8e.tar.gz talos-obmc-linux-6c51441cd0710330ccdb8dd0288e5316256d1c8e.zip |
usbip: use monotonic timestamps
This gets rid of the deprecated do_gettimeofday() function in usbip.
The comment above vgadget_get_frame() mentions that it suffers
from issues with the time jumps due to suspend and settimeofday,
so I'm changing it to use ktime_get_ts64() to use monotonic times
that don't have this problem.
I couldn't tell whether we should use CLOCK_MONOTONIC or
CLOCK_MONOTONIC_RAW here, the difference being the exact rate
when correcting for NTP. I picked monotonic time since it doesn't
change the speed to the existing code and should be better
synchronized with other machines we talk to.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/usbip/vudc_sysfs.c')
-rw-r--r-- | drivers/usb/usbip/vudc_sysfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/usbip/vudc_sysfs.c b/drivers/usb/usbip/vudc_sysfs.c index 7d978b824ed4..49e0123caa53 100644 --- a/drivers/usb/usbip/vudc_sysfs.c +++ b/drivers/usb/usbip/vudc_sysfs.c @@ -162,7 +162,7 @@ static ssize_t store_sockfd(struct device *dev, struct device_attribute *attr, udc->ud.status = SDEV_ST_USED; spin_unlock_irq(&udc->ud.lock); - do_gettimeofday(&udc->start_time); + ktime_get_ts64(&udc->start_time); v_start_timer(udc); udc->connected = 1; } else { |