summaryrefslogtreecommitdiff
path: root/isp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-02-01 15:01:45 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-04-16 23:40:56 +0200
commitde6799715da8893206cf1cee7f7c2022278f0d55 (patch)
treeb3b80ce6a92846fcee3f39590d605beade33c52b /isp
parente6d01ebf2b9999a6eb00a0da3266bc26a7b2402e (diff)
tools: Add div_round_up() macro
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'isp')
-rw-r--r--isp/tools.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/isp/tools.h b/isp/tools.h
index af29dd9..30bd14c 100644
--- a/isp/tools.h
+++ b/isp/tools.h
@@ -65,6 +65,8 @@
__val > __max ? __max : __val; \
})
+#define div_round_up(num, denom) (((num) + (denom) - 1) / (denom))
+
#define container_of(ptr, type, member) \
(type *)((char *)(ptr) - offsetof(type, member))