diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2014-08-04 17:00:40 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2014-08-04 17:00:40 +1000 |
commit | 1d42fcfe774211af917889db5bfff7ccb6b226fa (patch) | |
tree | 51bda16f752c893aba2aedb36dd314768401b59f /drivers/misc | |
parent | 189da3b9ff1fa12056be78d769970410b11e83c9 (diff) | |
parent | 30e8e851f9c57d4710754438c296fe3e92a525a1 (diff) |
Merge remote-tracking branch 'tip/auto-latest'
Conflicts:
arch/x86/Kconfig
drivers/acpi/acpi_extlog.c
drivers/net/wireless/ath/ath9k/hw.c
fs/nfs/pagelist.c
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/ioc4.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/misc/ioc4.c b/drivers/misc/ioc4.c index 06f6ad29ceff..3336ddca45ac 100644 --- a/drivers/misc/ioc4.c +++ b/drivers/misc/ioc4.c @@ -145,7 +145,6 @@ ioc4_clock_calibrate(struct ioc4_driver_data *idd) union ioc4_int_out int_out; union ioc4_gpcr gpcr; unsigned int state, last_state = 1; - struct timespec start_ts, end_ts; uint64_t start, end, period; unsigned int count = 0; @@ -174,10 +173,10 @@ ioc4_clock_calibrate(struct ioc4_driver_data *idd) if (!last_state && state) { count++; if (count == IOC4_CALIBRATE_END) { - ktime_get_ts(&end_ts); + end = ktime_get_ns(); break; } else if (count == IOC4_CALIBRATE_DISCARD) - ktime_get_ts(&start_ts); + start = ktime_get_ns(); } last_state = state; } while (1); @@ -192,8 +191,6 @@ ioc4_clock_calibrate(struct ioc4_driver_data *idd) * by which the IOC4 generates the square wave, to get the * period of an IOC4 INT_OUT count. */ - end = end_ts.tv_sec * NSEC_PER_SEC + end_ts.tv_nsec; - start = start_ts.tv_sec * NSEC_PER_SEC + start_ts.tv_nsec; period = (end - start) / (IOC4_CALIBRATE_CYCLES * 2 * (IOC4_CALIBRATE_COUNT + 1)); |