baylibre-acme: Use SR_HZ_TO_NS() when configuring the timerfd.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
This commit is contained in:
Bartosz Golaszewski 2015-07-01 10:47:38 +02:00
parent 7e5a048ff2
commit 7a1a3a36a9
1 changed files with 1 additions and 1 deletions

View File

@ -374,7 +374,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
}
tspec.it_interval.tv_sec = 0;
tspec.it_interval.tv_nsec = (1000000000L / devc->samplerate);
tspec.it_interval.tv_nsec = SR_HZ_TO_NS(devc->samplerate);
tspec.it_value = tspec.it_interval;
if (timerfd_settime(devc->timer_fd, 0, &tspec, NULL)) {