diff options
author | Tapasweni Pathak <tapaswenipathak@gmail.com> | 2014-10-20 16:58:10 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-10-23 12:48:31 +0800 |
commit | 2c1bfc3be0fc525d95ff5983bf8ea3f2aff24d1b (patch) | |
tree | a065a840802f3f175001e74e285a75ca8badf338 /drivers/staging/media/lirc/lirc_imon.c | |
parent | 17fbab1ee9a3e5d2a070450a0c76a3434278bc96 (diff) |
staging: media: lirc: Delete unused function tv2int
The function tv2int is used to convert timeval to int.
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_imon.c file of media: lirc driver.
tv2int function is static and not used anywhere in this file too,
so it is removed. I also build tested it.
Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/media/lirc/lirc_imon.c')
-rw-r--r-- | drivers/staging/media/lirc/lirc_imon.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/drivers/staging/media/lirc/lirc_imon.c b/drivers/staging/media/lirc/lirc_imon.c index 7aca44f28c5a..e4cfbe34e56d 100644 --- a/drivers/staging/media/lirc/lirc_imon.c +++ b/drivers/staging/media/lirc/lirc_imon.c @@ -572,29 +572,6 @@ static void submit_data(struct imon_context *context) wake_up(&context->driver->rbuf->wait_poll); } -static inline int tv2int(const struct timeval *a, const struct timeval *b) -{ - int usecs = 0; - int sec = 0; - - if (b->tv_usec > a->tv_usec) { - usecs = 1000000; - sec--; - } - - usecs += a->tv_usec - b->tv_usec; - - sec += a->tv_sec - b->tv_sec; - sec *= 1000; - usecs /= 1000; - sec += usecs; - - if (sec < 0) - sec = 1000; - - return sec; -} - /** * Process the incoming packet */ |