aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/init.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2015-04-19 21:32:26 -0400
committerDave Airlie <airlied@redhat.com>2015-04-19 23:05:20 -0400
commit2c33ce009ca2389dbf0535d0672214d09738e35e (patch)
tree6186a6458c3c160385d794a23eaf07c786a9e61b /include/linux/init.h
parentcec32a47010647e8b0603726ebb75b990a4057a4 (diff)
parent09d51602cf84a1264946711dd4ea0dddbac599a1 (diff)
Merge Linus master into drm-next
The merge is clean, but the arm build fails afterwards, due to API changes in the regulator tree. I've included the patch into the merge to fix the build. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/linux/init.h')
-rw-r--r--include/linux/init.h38
1 files changed, 29 insertions, 9 deletions
diff --git a/include/linux/init.h b/include/linux/init.h
index 2df8e8dd10a4..21b6d768edd7 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -253,21 +253,41 @@ struct obs_kernel_param {
253 * obs_kernel_param "array" too far apart in .init.setup. 253 * obs_kernel_param "array" too far apart in .init.setup.
254 */ 254 */
255#define __setup_param(str, unique_id, fn, early) \ 255#define __setup_param(str, unique_id, fn, early) \
256 static const char __setup_str_##unique_id[] __initconst \ 256 static const char __setup_str_##unique_id[] __initconst \
257 __aligned(1) = str; \ 257 __aligned(1) = str; \
258 static struct obs_kernel_param __setup_##unique_id \ 258 static struct obs_kernel_param __setup_##unique_id \
259 __used __section(.init.setup) \ 259 __used __section(.init.setup) \
260 __attribute__((aligned((sizeof(long))))) \ 260 __attribute__((aligned((sizeof(long))))) \
261 = { __setup_str_##unique_id, fn, early } 261 = { __setup_str_##unique_id, fn, early }
262 262
263#define __setup(str, fn) \ 263#define __setup(str, fn) \
264 __setup_param(str, fn, fn, 0) 264 __setup_param(str, fn, fn, 0)
265 265
266/* NOTE: fn is as per module_param, not __setup! Emits warning if fn 266/*
267 * returns non-zero. */ 267 * NOTE: fn is as per module_param, not __setup!
268#define early_param(str, fn) \ 268 * Emits warning if fn returns non-zero.
269 */
270#define early_param(str, fn) \
269 __setup_param(str, fn, fn, 1) 271 __setup_param(str, fn, fn, 1)
270 272
273#define early_param_on_off(str_on, str_off, var, config) \
274 \
275 int var = IS_ENABLED(config); \
276 \
277 static int __init parse_##var##_on(char *arg) \
278 { \
279 var = 1; \
280 return 0; \
281 } \
282 __setup_param(str_on, parse_##var##_on, parse_##var##_on, 1); \
283 \
284 static int __init parse_##var##_off(char *arg) \
285 { \
286 var = 0; \
287 return 0; \
288 } \
289 __setup_param(str_off, parse_##var##_off, parse_##var##_off, 1)
290
271/* Relies on boot_command_line being set */ 291/* Relies on boot_command_line being set */
272void __init parse_early_param(void); 292void __init parse_early_param(void);
273void __init parse_early_options(char *cmdline); 293void __init parse_early_options(char *cmdline);