aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorPete Zaitcev <zaitcev@redhat.com>2010-02-20 01:55:57 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-02 17:55:14 -0500
commit47cb17089c059d24e5da03f2b44ee3a089075b78 (patch)
treee64240fd1f2f189ebb638517783d41434b93fed9 /drivers/usb
parent444dc54c28740d90cb2d5f38e8163bcb46c5a885 (diff)
USB: usbmon: mask seconds properly in text API
The code does not implement the comment, so timestamps for long traces become confusing instead of wrapping neatly as expected. This was actually observed. Fortunately for API being in debugfs, we can just fix this instead of staying bug-for-bug compatible. Double fortunately, the stable binary API is not affected. Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/mon/mon_text.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/mon/mon_text.c b/drivers/usb/mon/mon_text.c
index 16bfb61d24f9..31c11888ec6a 100644
--- a/drivers/usb/mon/mon_text.c
+++ b/drivers/usb/mon/mon_text.c
@@ -180,7 +180,7 @@ static inline unsigned int mon_get_timestamp(void)
180 unsigned int stamp; 180 unsigned int stamp;
181 181
182 do_gettimeofday(&tval); 182 do_gettimeofday(&tval);
183 stamp = tval.tv_sec & 0xFFFF; /* 2^32 = 4294967296. Limit to 4096s. */ 183 stamp = tval.tv_sec & 0xFFF; /* 2^32 = 4294967296. Limit to 4096s. */
184 stamp = stamp * 1000000 + tval.tv_usec; 184 stamp = stamp * 1000000 + tval.tv_usec;
185 return stamp; 185 return stamp;
186} 186}