sysfs: registration_time: use ktime_get_ts

A fix to 03b3ce1a10: use ktime_get_ts
instead of getnstimeofday to better handle system time changes.
(Shaun Ruffell)

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
This commit is contained in:
Tzafrir Cohen 2014-01-28 20:39:21 +02:00
parent 02f6b4e7bd
commit fdca6f36de

View File

@ -50,7 +50,7 @@
#include <linux/list.h> #include <linux/list.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/mutex.h> #include <linux/mutex.h>
#include <linux/time.h> #include <linux/ktime.h>
#if defined(HAVE_UNLOCKED_IOCTL) && defined(CONFIG_BKL) #if defined(HAVE_UNLOCKED_IOCTL) && defined(CONFIG_BKL)
#include <linux/smp_lock.h> #include <linux/smp_lock.h>
@ -7405,7 +7405,7 @@ static int _dahdi_register_device(struct dahdi_device *ddev,
__dahdi_init_span(s); __dahdi_init_span(s);
} }
getnstimeofday(&ddev->registration_time); ktime_get_ts(&ddev->registration_time);
ret = dahdi_sysfs_add_device(ddev, parent); ret = dahdi_sysfs_add_device(ddev, parent);
if (ret) if (ret)
return ret; return ret;