linux/drivers/staging/media
Arnd Bergmann 8459503295 [media] staging: media: lirc: Replace timeval with ktime_t in lirc_serial.c
'struct timeval tv' is used to get current time.
'static struct timeval lasttv' is used to get last interrupt time.

32-bit systems using 'struct timeval' will break in the year 2038,
so we have to replace that code with more appropriate types.
This patch changes the lirc_serial.c file of media: lirc to use
ktime_t.

ktime_get() is  better than using do_gettimeofday(),
because it uses the monotonic clock. ktime_sub is used
to subtract two ktime variables. The check to test time
going backwards is also removed. Intialization to static
variable is also removed. ktime_to_us() is used to convert
ktime_t to microsecond value. deltv is changed to delkt, a
ktime_t type varibale from long to assign the ktime_sub value
directly. ktime_compare is used to compare delkt with 15
seconds, which is changed to a nanosecond value by using
ktime_set().

Build tested it.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-03 16:17:57 -02:00
..
bcm2048 [media] radio-bcm2048: fix code indent 2015-12-03 16:15:16 -02:00
cxd2099 staging: Remove <linux/moduleparam.h> header. 2015-03-01 17:09:52 -08:00
davinci_vpfe [media] staging: media: davinci_vpfe: fix ipipe_mode type 2015-11-17 14:27:28 -02:00
lirc [media] staging: media: lirc: Replace timeval with ktime_t in lirc_serial.c 2015-12-03 16:17:57 -02:00
mn88472 [media] staging: media: Drop owner assignment from i2c_driver 2015-08-11 13:02:49 -03:00
mn88473 [media] staging: media: Drop owner assignment from i2c_driver 2015-08-11 13:02:49 -03:00
omap4iss [media] media: omap4iss: Make module stop timeout print a warning message 2015-11-19 11:14:51 -02:00
Kconfig [media] dt3155: move out of staging into drivers/media/pci 2015-05-01 08:25:41 -03:00
Makefile [media] dt3155: move out of staging into drivers/media/pci 2015-05-01 08:25:41 -03:00