diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/backing-dev.h | 6 | ||||
-rw-r--r-- | include/linux/bug.h | 47 | ||||
-rw-r--r-- | include/linux/compiler-gcc.h | 3 | ||||
-rw-r--r-- | include/linux/compiler-gcc3.h | 8 | ||||
-rw-r--r-- | include/linux/compiler-gcc4.h | 36 | ||||
-rw-r--r-- | include/linux/compiler.h | 32 | ||||
-rw-r--r-- | include/linux/lockdep.h | 4 | ||||
-rw-r--r-- | include/linux/pagemap.h | 1 | ||||
-rw-r--r-- | include/linux/platform_data/lp855x.h | 19 | ||||
-rw-r--r-- | include/linux/printk.h | 18 | ||||
-rw-r--r-- | include/linux/smp.h | 3 |
11 files changed, 129 insertions, 48 deletions
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index 12731a19ef06..350459910fe1 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h | |||
@@ -254,6 +254,7 @@ int bdi_set_max_ratio(struct backing_dev_info *bdi, unsigned int max_ratio); | |||
254 | #define BDI_CAP_EXEC_MAP 0x00000040 | 254 | #define BDI_CAP_EXEC_MAP 0x00000040 |
255 | #define BDI_CAP_NO_ACCT_WB 0x00000080 | 255 | #define BDI_CAP_NO_ACCT_WB 0x00000080 |
256 | #define BDI_CAP_SWAP_BACKED 0x00000100 | 256 | #define BDI_CAP_SWAP_BACKED 0x00000100 |
257 | #define BDI_CAP_STABLE_WRITES 0x00000200 | ||
257 | 258 | ||
258 | #define BDI_CAP_VMFLAGS \ | 259 | #define BDI_CAP_VMFLAGS \ |
259 | (BDI_CAP_READ_MAP | BDI_CAP_WRITE_MAP | BDI_CAP_EXEC_MAP) | 260 | (BDI_CAP_READ_MAP | BDI_CAP_WRITE_MAP | BDI_CAP_EXEC_MAP) |
@@ -308,6 +309,11 @@ long wait_iff_congested(struct zone *zone, int sync, long timeout); | |||
308 | int pdflush_proc_obsolete(struct ctl_table *table, int write, | 309 | int pdflush_proc_obsolete(struct ctl_table *table, int write, |
309 | void __user *buffer, size_t *lenp, loff_t *ppos); | 310 | void __user *buffer, size_t *lenp, loff_t *ppos); |
310 | 311 | ||
312 | static inline bool bdi_cap_stable_pages_required(struct backing_dev_info *bdi) | ||
313 | { | ||
314 | return bdi->capabilities & BDI_CAP_STABLE_WRITES; | ||
315 | } | ||
316 | |||
311 | static inline bool bdi_cap_writeback_dirty(struct backing_dev_info *bdi) | 317 | static inline bool bdi_cap_writeback_dirty(struct backing_dev_info *bdi) |
312 | { | 318 | { |
313 | return !(bdi->capabilities & BDI_CAP_NO_WRITEBACK); | 319 | return !(bdi->capabilities & BDI_CAP_NO_WRITEBACK); |
diff --git a/include/linux/bug.h b/include/linux/bug.h index b1cf40de847e..7f4818673c41 100644 --- a/include/linux/bug.h +++ b/include/linux/bug.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _LINUX_BUG_H | 2 | #define _LINUX_BUG_H |
3 | 3 | ||
4 | #include <asm/bug.h> | 4 | #include <asm/bug.h> |
5 | #include <linux/compiler.h> | ||
5 | 6 | ||
6 | enum bug_trap_type { | 7 | enum bug_trap_type { |
7 | BUG_TRAP_TYPE_NONE = 0, | 8 | BUG_TRAP_TYPE_NONE = 0, |
@@ -12,11 +13,12 @@ enum bug_trap_type { | |||
12 | struct pt_regs; | 13 | struct pt_regs; |
13 | 14 | ||
14 | #ifdef __CHECKER__ | 15 | #ifdef __CHECKER__ |
15 | #define BUILD_BUG_ON_NOT_POWER_OF_2(n) | 16 | #define BUILD_BUG_ON_NOT_POWER_OF_2(n) (0) |
16 | #define BUILD_BUG_ON_ZERO(e) (0) | 17 | #define BUILD_BUG_ON_ZERO(e) (0) |
17 | #define BUILD_BUG_ON_NULL(e) ((void*)0) | 18 | #define BUILD_BUG_ON_NULL(e) ((void*)0) |
18 | #define BUILD_BUG_ON_INVALID(e) (0) | 19 | #define BUILD_BUG_ON_INVALID(e) (0) |
19 | #define BUILD_BUG_ON(condition) | 20 | #define BUILD_BUG_ON_MSG(cond, msg) (0) |
21 | #define BUILD_BUG_ON(condition) (0) | ||
20 | #define BUILD_BUG() (0) | 22 | #define BUILD_BUG() (0) |
21 | #else /* __CHECKER__ */ | 23 | #else /* __CHECKER__ */ |
22 | 24 | ||
@@ -39,29 +41,37 @@ struct pt_regs; | |||
39 | #define BUILD_BUG_ON_INVALID(e) ((void)(sizeof((__force long)(e)))) | 41 | #define BUILD_BUG_ON_INVALID(e) ((void)(sizeof((__force long)(e)))) |
40 | 42 | ||
41 | /** | 43 | /** |
44 | * BUILD_BUG_ON_MSG - break compile if a condition is true & emit supplied | ||
45 | * error message. | ||
46 | * @condition: the condition which the compiler should know is false. | ||
47 | * | ||
48 | * See BUILD_BUG_ON for description. | ||
49 | */ | ||
50 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) | ||
51 | |||
52 | /** | ||
42 | * BUILD_BUG_ON - break compile if a condition is true. | 53 | * BUILD_BUG_ON - break compile if a condition is true. |
43 | * @condition: the condition which the compiler should know is false. | 54 | * @condition: the condition which the compiler should know is false. |
44 | * | 55 | * |
45 | * If you have some code which relies on certain constants being equal, or | 56 | * If you have some code which relies on certain constants being equal, or |
46 | * other compile-time-evaluated condition, you should use BUILD_BUG_ON to | 57 | * some other compile-time-evaluated condition, you should use BUILD_BUG_ON to |
47 | * detect if someone changes it. | 58 | * detect if someone changes it. |
48 | * | 59 | * |
49 | * The implementation uses gcc's reluctance to create a negative array, but | 60 | * The implementation uses gcc's reluctance to create a negative array, but gcc |
50 | * gcc (as of 4.4) only emits that error for obvious cases (eg. not arguments | 61 | * (as of 4.4) only emits that error for obvious cases (e.g. not arguments to |
51 | * to inline functions). So as a fallback we use the optimizer; if it can't | 62 | * inline functions). Luckily, in 4.3 they added the "error" function |
52 | * prove the condition is false, it will cause a link error on the undefined | 63 | * attribute just for this type of case. Thus, we use a negative sized array |
53 | * "__build_bug_on_failed". This error message can be harder to track down | 64 | * (should always create an error on gcc versions older than 4.4) and then call |
54 | * though, hence the two different methods. | 65 | * an undefined function with the error attribute (should always create an |
66 | * error on gcc 4.3 and later). If for some reason, neither creates a | ||
67 | * compile-time error, we'll still have a link-time error, which is harder to | ||
68 | * track down. | ||
55 | */ | 69 | */ |
56 | #ifndef __OPTIMIZE__ | 70 | #ifndef __OPTIMIZE__ |
57 | #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) | 71 | #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) |
58 | #else | 72 | #else |
59 | extern int __build_bug_on_failed; | 73 | #define BUILD_BUG_ON(condition) \ |
60 | #define BUILD_BUG_ON(condition) \ | 74 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition) |
61 | do { \ | ||
62 | ((void)sizeof(char[1 - 2*!!(condition)])); \ | ||
63 | if (condition) __build_bug_on_failed = 1; \ | ||
64 | } while(0) | ||
65 | #endif | 75 | #endif |
66 | 76 | ||
67 | /** | 77 | /** |
@@ -71,12 +81,7 @@ extern int __build_bug_on_failed; | |||
71 | * build time, you should use BUILD_BUG to detect if it is | 81 | * build time, you should use BUILD_BUG to detect if it is |
72 | * unexpectedly used. | 82 | * unexpectedly used. |
73 | */ | 83 | */ |
74 | #define BUILD_BUG() \ | 84 | #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed") |
75 | do { \ | ||
76 | extern void __build_bug_failed(void) \ | ||
77 | __linktime_error("BUILD_BUG failed"); \ | ||
78 | __build_bug_failed(); \ | ||
79 | } while (0) | ||
80 | 85 | ||
81 | #endif /* __CHECKER__ */ | 86 | #endif /* __CHECKER__ */ |
82 | 87 | ||
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 6a6d7aefe12d..24545cd90a25 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
@@ -5,6 +5,9 @@ | |||
5 | /* | 5 | /* |
6 | * Common definitions for all gcc versions go here. | 6 | * Common definitions for all gcc versions go here. |
7 | */ | 7 | */ |
8 | #define GCC_VERSION (__GNUC__ * 10000 \ | ||
9 | + __GNUC_MINOR__ * 100 \ | ||
10 | + __GNUC_PATCHLEVEL__) | ||
8 | 11 | ||
9 | 12 | ||
10 | /* Optimization barrier */ | 13 | /* Optimization barrier */ |
diff --git a/include/linux/compiler-gcc3.h b/include/linux/compiler-gcc3.h index 37d412436d0f..7d89febe4d79 100644 --- a/include/linux/compiler-gcc3.h +++ b/include/linux/compiler-gcc3.h | |||
@@ -2,22 +2,22 @@ | |||
2 | #error "Please don't include <linux/compiler-gcc3.h> directly, include <linux/compiler.h> instead." | 2 | #error "Please don't include <linux/compiler-gcc3.h> directly, include <linux/compiler.h> instead." |
3 | #endif | 3 | #endif |
4 | 4 | ||
5 | #if __GNUC_MINOR__ < 2 | 5 | #if GCC_VERSION < 30200 |
6 | # error Sorry, your compiler is too old - please upgrade it. | 6 | # error Sorry, your compiler is too old - please upgrade it. |
7 | #endif | 7 | #endif |
8 | 8 | ||
9 | #if __GNUC_MINOR__ >= 3 | 9 | #if GCC_VERSION >= 30300 |
10 | # define __used __attribute__((__used__)) | 10 | # define __used __attribute__((__used__)) |
11 | #else | 11 | #else |
12 | # define __used __attribute__((__unused__)) | 12 | # define __used __attribute__((__unused__)) |
13 | #endif | 13 | #endif |
14 | 14 | ||
15 | #if __GNUC_MINOR__ >= 4 | 15 | #if GCC_VERSION >= 30400 |
16 | #define __must_check __attribute__((warn_unused_result)) | 16 | #define __must_check __attribute__((warn_unused_result)) |
17 | #endif | 17 | #endif |
18 | 18 | ||
19 | #ifdef CONFIG_GCOV_KERNEL | 19 | #ifdef CONFIG_GCOV_KERNEL |
20 | # if __GNUC_MINOR__ < 4 | 20 | # if GCC_VERSION < 30400 |
21 | # error "GCOV profiling support for gcc versions below 3.4 not included" | 21 | # error "GCOV profiling support for gcc versions below 3.4 not included" |
22 | # endif /* __GNUC_MINOR__ */ | 22 | # endif /* __GNUC_MINOR__ */ |
23 | #endif /* CONFIG_GCOV_KERNEL */ | 23 | #endif /* CONFIG_GCOV_KERNEL */ |
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index 662fd1b4c42a..68b162d92254 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | /* GCC 4.1.[01] miscompiles __weak */ | 5 | /* GCC 4.1.[01] miscompiles __weak */ |
6 | #ifdef __KERNEL__ | 6 | #ifdef __KERNEL__ |
7 | # if __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ <= 1 | 7 | # if GCC_VERSION >= 40100 && GCC_VERSION <= 40101 |
8 | # error Your version of gcc miscompiles the __weak directive | 8 | # error Your version of gcc miscompiles the __weak directive |
9 | # endif | 9 | # endif |
10 | #endif | 10 | #endif |
@@ -13,7 +13,11 @@ | |||
13 | #define __must_check __attribute__((warn_unused_result)) | 13 | #define __must_check __attribute__((warn_unused_result)) |
14 | #define __compiler_offsetof(a,b) __builtin_offsetof(a,b) | 14 | #define __compiler_offsetof(a,b) __builtin_offsetof(a,b) |
15 | 15 | ||
16 | #if __GNUC_MINOR__ >= 3 | 16 | #if GCC_VERSION >= 40100 |
17 | # define __compiletime_object_size(obj) __builtin_object_size(obj, 0) | ||
18 | #endif | ||
19 | |||
20 | #if GCC_VERSION >= 40300 | ||
17 | /* Mark functions as cold. gcc will assume any path leading to a call | 21 | /* Mark functions as cold. gcc will assume any path leading to a call |
18 | to them will be unlikely. This means a lot of manual unlikely()s | 22 | to them will be unlikely. This means a lot of manual unlikely()s |
19 | are unnecessary now for any paths leading to the usual suspects | 23 | are unnecessary now for any paths leading to the usual suspects |
@@ -29,11 +33,15 @@ | |||
29 | the kernel context */ | 33 | the kernel context */ |
30 | #define __cold __attribute__((__cold__)) | 34 | #define __cold __attribute__((__cold__)) |
31 | 35 | ||
32 | #define __linktime_error(message) __attribute__((__error__(message))) | ||
33 | |||
34 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | 36 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) |
35 | 37 | ||
36 | #if __GNUC_MINOR__ >= 5 | 38 | #ifndef __CHECKER__ |
39 | # define __compiletime_warning(message) __attribute__((warning(message))) | ||
40 | # define __compiletime_error(message) __attribute__((error(message))) | ||
41 | #endif /* __CHECKER__ */ | ||
42 | #endif /* GCC_VERSION >= 40300 */ | ||
43 | |||
44 | #if GCC_VERSION >= 40500 | ||
37 | /* | 45 | /* |
38 | * Mark a position in code as unreachable. This can be used to | 46 | * Mark a position in code as unreachable. This can be used to |
39 | * suppress control flow warnings after asm blocks that transfer | 47 | * suppress control flow warnings after asm blocks that transfer |
@@ -48,30 +56,22 @@ | |||
48 | /* Mark a function definition as prohibited from being cloned. */ | 56 | /* Mark a function definition as prohibited from being cloned. */ |
49 | #define __noclone __attribute__((__noclone__)) | 57 | #define __noclone __attribute__((__noclone__)) |
50 | 58 | ||
51 | #endif | 59 | #endif /* GCC_VERSION >= 40500 */ |
52 | #endif | ||
53 | 60 | ||
54 | #if __GNUC_MINOR__ >= 6 | 61 | #if GCC_VERSION >= 40600 |
55 | /* | 62 | /* |
56 | * Tell the optimizer that something else uses this function or variable. | 63 | * Tell the optimizer that something else uses this function or variable. |
57 | */ | 64 | */ |
58 | #define __visible __attribute__((externally_visible)) | 65 | #define __visible __attribute__((externally_visible)) |
59 | #endif | 66 | #endif |
60 | 67 | ||
61 | #if __GNUC_MINOR__ > 0 | ||
62 | #define __compiletime_object_size(obj) __builtin_object_size(obj, 0) | ||
63 | #endif | ||
64 | #if __GNUC_MINOR__ >= 3 && !defined(__CHECKER__) | ||
65 | #define __compiletime_warning(message) __attribute__((warning(message))) | ||
66 | #define __compiletime_error(message) __attribute__((error(message))) | ||
67 | #endif | ||
68 | 68 | ||
69 | #ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP | 69 | #ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP |
70 | #if __GNUC_MINOR__ >= 4 | 70 | #if GCC_VERSION >= 40400 |
71 | #define __HAVE_BUILTIN_BSWAP32__ | 71 | #define __HAVE_BUILTIN_BSWAP32__ |
72 | #define __HAVE_BUILTIN_BSWAP64__ | 72 | #define __HAVE_BUILTIN_BSWAP64__ |
73 | #endif | 73 | #endif |
74 | #if __GNUC_MINOR__ >= 8 || (defined(__powerpc__) && __GNUC_MINOR__ >= 6) | 74 | #if GCC_VERSION >= 40800 || (defined(__powerpc__) && GCC_VERSION >= 40600) |
75 | #define __HAVE_BUILTIN_BSWAP16__ | 75 | #define __HAVE_BUILTIN_BSWAP16__ |
76 | #endif | 76 | #endif |
77 | #endif | 77 | #endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ |
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index dd852b73b286..10b8f23fab0f 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
@@ -307,10 +307,36 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); | |||
307 | #endif | 307 | #endif |
308 | #ifndef __compiletime_error | 308 | #ifndef __compiletime_error |
309 | # define __compiletime_error(message) | 309 | # define __compiletime_error(message) |
310 | # define __compiletime_error_fallback(condition) \ | ||
311 | do { ((void)sizeof(char[1 - 2 * condition])); } while (0) | ||
312 | #else | ||
313 | # define __compiletime_error_fallback(condition) do { } while (0) | ||
310 | #endif | 314 | #endif |
311 | #ifndef __linktime_error | 315 | |
312 | # define __linktime_error(message) | 316 | #define __compiletime_assert(condition, msg, prefix, suffix) \ |
313 | #endif | 317 | do { \ |
318 | bool __cond = !(condition); \ | ||
319 | extern void prefix ## suffix(void) __compiletime_error(msg); \ | ||
320 | if (__cond) \ | ||
321 | prefix ## suffix(); \ | ||
322 | __compiletime_error_fallback(__cond); \ | ||
323 | } while (0) | ||
324 | |||
325 | #define _compiletime_assert(condition, msg, prefix, suffix) \ | ||
326 | __compiletime_assert(condition, msg, prefix, suffix) | ||
327 | |||
328 | /** | ||
329 | * compiletime_assert - break build and emit msg if condition is false | ||
330 | * @condition: a compile-time constant condition to check | ||
331 | * @msg: a message to emit if condition is false | ||
332 | * | ||
333 | * In tradition of POSIX assert, this macro will break the build if the | ||
334 | * supplied condition is *false*, emitting the supplied error message if the | ||
335 | * compiler has support to do so. | ||
336 | */ | ||
337 | #define compiletime_assert(condition, msg) \ | ||
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) | ||
339 | |||
314 | /* | 340 | /* |
315 | * Prevent the compiler from merging or refetching accesses. The compiler | 341 | * Prevent the compiler from merging or refetching accesses. The compiler |
316 | * is also forbidden from reordering successive instances of ACCESS_ONCE(), | 342 | * is also forbidden from reordering successive instances of ACCESS_ONCE(), |
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 2bca44b0893c..bfe88c4aa251 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
@@ -359,7 +359,9 @@ extern void lockdep_trace_alloc(gfp_t mask); | |||
359 | 359 | ||
360 | #define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0) | 360 | #define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0) |
361 | 361 | ||
362 | #define lockdep_assert_held(l) WARN_ON(debug_locks && !lockdep_is_held(l)) | 362 | #define lockdep_assert_held(l) do { \ |
363 | WARN_ON(debug_locks && !lockdep_is_held(l)); \ | ||
364 | } while (0) | ||
363 | 365 | ||
364 | #define lockdep_recursing(tsk) ((tsk)->lockdep_recursion) | 366 | #define lockdep_recursing(tsk) ((tsk)->lockdep_recursion) |
365 | 367 | ||
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 6da609d14c15..0e38e13eb249 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
@@ -414,6 +414,7 @@ static inline void wait_on_page_writeback(struct page *page) | |||
414 | } | 414 | } |
415 | 415 | ||
416 | extern void end_page_writeback(struct page *page); | 416 | extern void end_page_writeback(struct page *page); |
417 | void wait_for_stable_page(struct page *page); | ||
417 | 418 | ||
418 | /* | 419 | /* |
419 | * Add an arbitrary waiter to a page's wait queue | 420 | * Add an arbitrary waiter to a page's wait queue |
diff --git a/include/linux/platform_data/lp855x.h b/include/linux/platform_data/lp855x.h index e81f62d24ee2..20ee8b221dbd 100644 --- a/include/linux/platform_data/lp855x.h +++ b/include/linux/platform_data/lp855x.h | |||
@@ -49,12 +49,24 @@ | |||
49 | #define LP8556_FAST_CONFIG BIT(7) /* use it if EPROMs should be maintained | 49 | #define LP8556_FAST_CONFIG BIT(7) /* use it if EPROMs should be maintained |
50 | when exiting the low power mode */ | 50 | when exiting the low power mode */ |
51 | 51 | ||
52 | /* CONFIG register - LP8557 */ | ||
53 | #define LP8557_PWM_STANDBY BIT(7) | ||
54 | #define LP8557_PWM_FILTER BIT(6) | ||
55 | #define LP8557_RELOAD_EPROM BIT(3) /* use it if EPROMs should be reset | ||
56 | when the backlight turns on */ | ||
57 | #define LP8557_OFF_OPENLEDS BIT(2) | ||
58 | #define LP8557_PWM_CONFIG LP8557_PWM_ONLY | ||
59 | #define LP8557_I2C_CONFIG LP8557_I2C_ONLY | ||
60 | #define LP8557_COMB1_CONFIG LP8557_COMBINED1 | ||
61 | #define LP8557_COMB2_CONFIG LP8557_COMBINED2 | ||
62 | |||
52 | enum lp855x_chip_id { | 63 | enum lp855x_chip_id { |
53 | LP8550, | 64 | LP8550, |
54 | LP8551, | 65 | LP8551, |
55 | LP8552, | 66 | LP8552, |
56 | LP8553, | 67 | LP8553, |
57 | LP8556, | 68 | LP8556, |
69 | LP8557, | ||
58 | }; | 70 | }; |
59 | 71 | ||
60 | enum lp855x_brightness_ctrl_mode { | 72 | enum lp855x_brightness_ctrl_mode { |
@@ -89,6 +101,13 @@ enum lp8556_brightness_source { | |||
89 | LP8556_COMBINED2, /* pwm + i2c after the shaper block */ | 101 | LP8556_COMBINED2, /* pwm + i2c after the shaper block */ |
90 | }; | 102 | }; |
91 | 103 | ||
104 | enum lp8557_brightness_source { | ||
105 | LP8557_PWM_ONLY, | ||
106 | LP8557_I2C_ONLY, | ||
107 | LP8557_COMBINED1, /* pwm + i2c after the shaper block */ | ||
108 | LP8557_COMBINED2, /* pwm + i2c before the shaper block */ | ||
109 | }; | ||
110 | |||
92 | struct lp855x_rom_data { | 111 | struct lp855x_rom_data { |
93 | u8 addr; | 112 | u8 addr; |
94 | u8 val; | 113 | u8 val; |
diff --git a/include/linux/printk.h b/include/linux/printk.h index 5bef3045218e..1249a54d17e0 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h | |||
@@ -252,6 +252,15 @@ extern void dump_stack(void) __cold; | |||
252 | printk_once(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) | 252 | printk_once(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) |
253 | #define pr_cont_once(fmt, ...) \ | 253 | #define pr_cont_once(fmt, ...) \ |
254 | printk_once(KERN_CONT pr_fmt(fmt), ##__VA_ARGS__) | 254 | printk_once(KERN_CONT pr_fmt(fmt), ##__VA_ARGS__) |
255 | |||
256 | #if defined(DEBUG) | ||
257 | #define pr_devel_once(fmt, ...) \ | ||
258 | printk_once(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | ||
259 | #else | ||
260 | #define pr_devel_once(fmt, ...) \ | ||
261 | no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | ||
262 | #endif | ||
263 | |||
255 | /* If you are writing a driver, please use dev_dbg instead */ | 264 | /* If you are writing a driver, please use dev_dbg instead */ |
256 | #if defined(DEBUG) | 265 | #if defined(DEBUG) |
257 | #define pr_debug_once(fmt, ...) \ | 266 | #define pr_debug_once(fmt, ...) \ |
@@ -295,6 +304,15 @@ extern void dump_stack(void) __cold; | |||
295 | #define pr_info_ratelimited(fmt, ...) \ | 304 | #define pr_info_ratelimited(fmt, ...) \ |
296 | printk_ratelimited(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) | 305 | printk_ratelimited(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) |
297 | /* no pr_cont_ratelimited, don't do that... */ | 306 | /* no pr_cont_ratelimited, don't do that... */ |
307 | |||
308 | #if defined(DEBUG) | ||
309 | #define pr_devel_ratelimited(fmt, ...) \ | ||
310 | printk_ratelimited(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | ||
311 | #else | ||
312 | #define pr_devel_ratelimited(fmt, ...) \ | ||
313 | no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | ||
314 | #endif | ||
315 | |||
298 | /* If you are writing a driver, please use dev_dbg instead */ | 316 | /* If you are writing a driver, please use dev_dbg instead */ |
299 | #if defined(DEBUG) | 317 | #if defined(DEBUG) |
300 | #define pr_debug_ratelimited(fmt, ...) \ | 318 | #define pr_debug_ratelimited(fmt, ...) \ |
diff --git a/include/linux/smp.h b/include/linux/smp.h index dd6f06be3c9f..3e07a7df6478 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
@@ -89,7 +89,8 @@ void kick_all_cpus_sync(void); | |||
89 | #ifdef CONFIG_USE_GENERIC_SMP_HELPERS | 89 | #ifdef CONFIG_USE_GENERIC_SMP_HELPERS |
90 | void __init call_function_init(void); | 90 | void __init call_function_init(void); |
91 | void generic_smp_call_function_single_interrupt(void); | 91 | void generic_smp_call_function_single_interrupt(void); |
92 | void generic_smp_call_function_interrupt(void); | 92 | #define generic_smp_call_function_interrupt \ |
93 | generic_smp_call_function_single_interrupt | ||
93 | #else | 94 | #else |
94 | static inline void call_function_init(void) { } | 95 | static inline void call_function_init(void) { } |
95 | #endif | 96 | #endif |