diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2017-09-12 11:21:00 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2017-09-28 07:29:43 +0200 |
commit | 08c6df97d65a1cb24393d2051bf12ab05f8d7fb6 (patch) | |
tree | 6deab9be48f8664b1a2a42bc40cf42d968b05ad5 /drivers/s390/cio/cmf.c | |
parent | s390/cmf: avg_utilization (diff) | |
download | linux-08c6df97d65a1cb24393d2051bf12ab05f8d7fb6.tar.xz linux-08c6df97d65a1cb24393d2051bf12ab05f8d7fb6.zip |
s390/cmf: use tod_to_ns()
Instead of open coding tod clock to ns conversions use the timex helper.
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/cmf.c')
-rw-r--r-- | drivers/s390/cio/cmf.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/s390/cio/cmf.c b/drivers/s390/cio/cmf.c index 0b10221c4661..7d59230e88bb 100644 --- a/drivers/s390/cio/cmf.c +++ b/drivers/s390/cio/cmf.c @@ -685,8 +685,7 @@ static int readall_cmb(struct ccw_device *cdev, struct cmbdata *data) /* we only know values before device_busy_time */ data->size = offsetof(struct cmbdata, device_busy_time); - /* convert to nanoseconds */ - data->elapsed_time = (time * 1000) >> 12; + data->elapsed_time = tod_to_ns(time); /* copy data to new structure */ data->ssch_rsch_count = cmb->ssch_rsch_count; @@ -945,8 +944,7 @@ static int readall_cmbe(struct ccw_device *cdev, struct cmbdata *data) /* we only know values before device_busy_time */ data->size = offsetof(struct cmbdata, device_busy_time); - /* conver to nanoseconds */ - data->elapsed_time = (time * 1000) >> 12; + data->elapsed_time = tod_to_ns(time); cmb = cmb_data->last_block; /* copy data to new structure */ @@ -1007,7 +1005,7 @@ static ssize_t cmb_show_avg_sample_interval(struct device *dev, spin_lock_irq(cdev->ccwlock); if (count) { interval = get_tod_clock() - cdev->private->cmb_start_time; - interval = (interval * 1000) >> 12; + interval = tod_to_ns(interval); interval /= count; } else interval = -1; |