[PATCH] regmap: include <linux/ktime.h> from include/linux/regmap.h

From: Sean Wang
Date: Mon Apr 23 2018 - 02:42:44 EST


Similar to the readx_poll_timeout() macro calling ktime_* and using
ktime_t type, which is declared in <linux/ktime.h>. So, make
include/linux/regmap.h explicitly include <linux/ktime.h>, like
include/linux/iopoll.h does. Otherwise, users of the macro will see
below errors.

error: implicit declaration of function âktime_add_usâ
[-Werror=implicit-function-declaration]

error: implicit declaration of function âktime_getâ
[-Werror=implicit-function-declaration]

error: implicit declaration of function âktime_compareâ
[-Werror=implicit-function-declaration]

include/linux/regmap.h:128:2: error: unknown type name âktime_tâ
ktime_t __timeout = ktime_add_us(ktime_get(), __timeout_us); \

Signed-off-by: Sean Wang <sean.wang@xxxxxxxxxxxx>
Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
---
include/linux/regmap.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index 5f7ad0552c03..b6865f070464 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -15,6 +15,7 @@

#include <linux/list.h>
#include <linux/rbtree.h>
+#include <linux/ktime.h>
#include <linux/delay.h>
#include <linux/err.h>
#include <linux/bug.h>
--
2.17.0