aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kernel.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2012-09-19 13:21:21 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-09-19 13:21:21 -0400
commit0b6c404a07e3240b95aa5682fb8fd57c41609d7a (patch)
treec4d410b0ec7044922b73c39ecfb3fbb620c29282 /include/linux/kernel.h
parent609455f481772c5a875b88e860a2ee0e2f25ebf0 (diff)
parent55d512e245bc7699a8800e23df1a24195dd08217 (diff)
Merge tag 'v3.6-rc5' into for-linus
Sync with mainline so that I can revert an input patch that came in through another subsystem tree.
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r--include/linux/kernel.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index e07f5e0c5df4..594b419b7d20 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -82,10 +82,18 @@
82 __x - (__x % (y)); \ 82 __x - (__x % (y)); \
83} \ 83} \
84) 84)
85
86/*
87 * Divide positive or negative dividend by positive divisor and round
88 * to closest integer. Result is undefined for negative divisors.
89 */
85#define DIV_ROUND_CLOSEST(x, divisor)( \ 90#define DIV_ROUND_CLOSEST(x, divisor)( \
86{ \ 91{ \
87 typeof(divisor) __divisor = divisor; \ 92 typeof(x) __x = x; \
88 (((x) + ((__divisor) / 2)) / (__divisor)); \ 93 typeof(divisor) __d = divisor; \
94 (((typeof(x))-1) >= 0 || (__x) >= 0) ? \
95 (((__x) + ((__d) / 2)) / (__d)) : \
96 (((__x) - ((__d) / 2)) / (__d)); \
89} \ 97} \
90) 98)
91 99
@@ -377,7 +385,6 @@ extern enum system_states {
377 SYSTEM_HALT, 385 SYSTEM_HALT,
378 SYSTEM_POWER_OFF, 386 SYSTEM_POWER_OFF,
379 SYSTEM_RESTART, 387 SYSTEM_RESTART,
380 SYSTEM_SUSPEND_DISK,
381} system_state; 388} system_state;
382 389
383#define TAINT_PROPRIETARY_MODULE 0 390#define TAINT_PROPRIETARY_MODULE 0