aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/init.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-07-23 03:41:16 -0400
committerDavid S. Miller <davem@davemloft.net>2015-07-23 03:41:16 -0400
commitc5e40ee287db61a79af1746954ee03ebbf1ff8a3 (patch)
tree007da00e75e9b84766ac4868421705300e1e2e14 /include/linux/init.h
parent052831879945be0d9fad2216b127147c565ec1b1 (diff)
parentc5dfd654d0ec0a28fe81e7bd4d4fd984a9855e09 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: net/bridge/br_mdb.c br_mdb.c conflict was a function call being removed to fix a bug in 'net' but whose signature was changed in 'net-next'. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/init.h')
-rw-r--r--include/linux/init.h78
1 files changed, 0 insertions, 78 deletions
diff --git a/include/linux/init.h b/include/linux/init.h
index 7c68c36d3fd8..b449f378f995 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -282,68 +282,8 @@ void __init parse_early_param(void);
282void __init parse_early_options(char *cmdline); 282void __init parse_early_options(char *cmdline);
283#endif /* __ASSEMBLY__ */ 283#endif /* __ASSEMBLY__ */
284 284
285/**
286 * module_init() - driver initialization entry point
287 * @x: function to be run at kernel boot time or module insertion
288 *
289 * module_init() will either be called during do_initcalls() (if
290 * builtin) or at module insertion time (if a module). There can only
291 * be one per module.
292 */
293#define module_init(x) __initcall(x);
294
295/**
296 * module_exit() - driver exit entry point
297 * @x: function to be run when driver is removed
298 *
299 * module_exit() will wrap the driver clean-up code
300 * with cleanup_module() when used with rmmod when
301 * the driver is a module. If the driver is statically
302 * compiled into the kernel, module_exit() has no effect.
303 * There can only be one per module.
304 */
305#define module_exit(x) __exitcall(x);
306
307#else /* MODULE */ 285#else /* MODULE */
308 286
309/*
310 * In most cases loadable modules do not need custom
311 * initcall levels. There are still some valid cases where
312 * a driver may be needed early if built in, and does not
313 * matter when built as a loadable module. Like bus
314 * snooping debug drivers.
315 */
316#define early_initcall(fn) module_init(fn)
317#define core_initcall(fn) module_init(fn)
318#define core_initcall_sync(fn) module_init(fn)
319#define postcore_initcall(fn) module_init(fn)
320#define postcore_initcall_sync(fn) module_init(fn)
321#define arch_initcall(fn) module_init(fn)
322#define subsys_initcall(fn) module_init(fn)
323#define subsys_initcall_sync(fn) module_init(fn)
324#define fs_initcall(fn) module_init(fn)
325#define fs_initcall_sync(fn) module_init(fn)
326#define rootfs_initcall(fn) module_init(fn)
327#define device_initcall(fn) module_init(fn)
328#define device_initcall_sync(fn) module_init(fn)
329#define late_initcall(fn) module_init(fn)
330#define late_initcall_sync(fn) module_init(fn)
331
332#define console_initcall(fn) module_init(fn)
333#define security_initcall(fn) module_init(fn)
334
335/* Each module must use one module_init(). */
336#define module_init(initfn) \
337 static inline initcall_t __inittest(void) \
338 { return initfn; } \
339 int init_module(void) __attribute__((alias(#initfn)));
340
341/* This is only required if you want to be unloadable. */
342#define module_exit(exitfn) \
343 static inline exitcall_t __exittest(void) \
344 { return exitfn; } \
345 void cleanup_module(void) __attribute__((alias(#exitfn)));
346
347#define __setup_param(str, unique_id, fn) /* nothing */ 287#define __setup_param(str, unique_id, fn) /* nothing */
348#define __setup(str, func) /* nothing */ 288#define __setup(str, func) /* nothing */
349#endif 289#endif
@@ -351,24 +291,6 @@ void __init parse_early_options(char *cmdline);
351/* Data marked not to be saved by software suspend */ 291/* Data marked not to be saved by software suspend */
352#define __nosavedata __section(.data..nosave) 292#define __nosavedata __section(.data..nosave)
353 293
354/* This means "can be init if no module support, otherwise module load
355 may call it." */
356#ifdef CONFIG_MODULES
357#define __init_or_module
358#define __initdata_or_module
359#define __initconst_or_module
360#define __INIT_OR_MODULE .text
361#define __INITDATA_OR_MODULE .data
362#define __INITRODATA_OR_MODULE .section ".rodata","a",%progbits
363#else
364#define __init_or_module __init
365#define __initdata_or_module __initdata
366#define __initconst_or_module __initconst
367#define __INIT_OR_MODULE __INIT
368#define __INITDATA_OR_MODULE __INITDATA
369#define __INITRODATA_OR_MODULE __INITRODATA
370#endif /*CONFIG_MODULES*/
371
372#ifdef MODULE 294#ifdef MODULE
373#define __exit_p(x) x 295#define __exit_p(x) x
374#else 296#else