Skip to content

Commit

Permalink
USB: mon: use ktime_get_real_ts64 instead of getnstimeofday64
Browse files Browse the repository at this point in the history
The two do the same thing, but we want to remove getnstimeofday64()
to have a more consistent interface.

It would be nice to use a monotonic clocksource here rather than
'real' time, but that would break the user interface.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
arndb authored and gregkh committed Jun 25, 2018
1 parent 8f9cc83 commit 61ef4b9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/usb/mon/mon_bin.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ struct mon_bin_hdr {
unsigned short busnum; /* Bus number */
char flag_setup;
char flag_data;
s64 ts_sec; /* getnstimeofday64 */
s32 ts_usec; /* getnstimeofday64 */
s64 ts_sec; /* ktime_get_real_ts64 */
s32 ts_usec; /* ktime_get_real_ts64 */
int status;
unsigned int len_urb; /* Length of data (submitted or actual) */
unsigned int len_cap; /* Delivered length */
Expand Down Expand Up @@ -497,7 +497,7 @@ static void mon_bin_event(struct mon_reader_bin *rp, struct urb *urb,
struct mon_bin_hdr *ep;
char data_tag = 0;

getnstimeofday64(&ts);
ktime_get_real_ts64(&ts);

spin_lock_irqsave(&rp->b_lock, flags);

Expand Down Expand Up @@ -637,7 +637,7 @@ static void mon_bin_error(void *data, struct urb *urb, int error)
unsigned int offset;
struct mon_bin_hdr *ep;

getnstimeofday64(&ts);
ktime_get_real_ts64(&ts);

spin_lock_irqsave(&rp->b_lock, flags);

Expand Down

0 comments on commit 61ef4b9

Please sign in to comment.