X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=drivers%2Fstaging%2Fft1000%2Fft1000-usb%2Fft1000_debug.c;h=2070a657566e17552d8b738de90acca8360a53d0;hb=ce18995f0c7d619508c43298b77c97a953620018;hp=2d758fb26eac3c818f5e6adb91f08ec9171a7487;hpb=d03e8d811a84c6fd176cd69e9dcba5f2e9f0e11c;p=karo-tx-linux.git diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c index 2d758fb26eac..2070a657566e 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c @@ -412,7 +412,6 @@ static long ft1000_ioctl(struct file *file, unsigned int command, int i; u16 tempword; unsigned long flags; - struct timeval tv; struct IOCTL_GET_VER get_ver_data; struct IOCTL_GET_DSP_STAT get_stat_data; u8 ConnectionMsg[] = {0x00, 0x44, 0x10, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x93, 0x64, @@ -510,8 +509,7 @@ static long ft1000_ioctl(struct file *file, unsigned int command, get_stat_data.nRxPkts = info->stats.rx_packets; get_stat_data.nTxBytes = info->stats.tx_bytes; get_stat_data.nRxBytes = info->stats.rx_bytes; - do_gettimeofday(&tv); - get_stat_data.ConTm = (u32)(tv.tv_sec - info->ConTm); + get_stat_data.ConTm = ktime_get_seconds() - info->ConTm; pr_debug("Connection Time = %d\n", (int)get_stat_data.ConTm); if (copy_to_user(argp, &get_stat_data, sizeof(get_stat_data))) { pr_debug("copy fault occurred\n");