]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.2.7/mips-cdmm-add-builtin_mips_cdmm_driver-macro.patch
Drop watchdog patch
[thirdparty/kernel/stable-queue.git] / releases / 4.2.7 / mips-cdmm-add-builtin_mips_cdmm_driver-macro.patch
1 From 1b4a5ddb127caf125e14551ebd334be1acf21805 Mon Sep 17 00:00:00 2001
2 From: James Hogan <james.hogan@imgtec.com>
3 Date: Tue, 6 Oct 2015 15:12:05 +0100
4 Subject: MIPS: CDMM: Add builtin_mips_cdmm_driver() macro
5
6 From: James Hogan <james.hogan@imgtec.com>
7
8 commit 1b4a5ddb127caf125e14551ebd334be1acf21805 upstream.
9
10 Add helper macro builtin_mips_cdmm_driver() for builtin CDMM drivers
11 that don't do anything special in init and have no exit. The
12 module_mips_cdmm_driver() helper isn't really appropriate for drivers
13 that can't be built as a module.
14
15 Signed-off-by: James Hogan <james.hogan@imgtec.com>
16 Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17 Cc: Jiri Slaby <jslaby@suse.com>
18 Cc: linux-mips@linux-mips.org
19 Patchwork: http://patchwork.linux-mips.org/patch/11264/
20 Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
21 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22
23 ---
24 arch/mips/include/asm/cdmm.h | 11 +++++++++++
25 1 file changed, 11 insertions(+)
26
27 --- a/arch/mips/include/asm/cdmm.h
28 +++ b/arch/mips/include/asm/cdmm.h
29 @@ -84,6 +84,17 @@ void mips_cdmm_driver_unregister(struct
30 module_driver(__mips_cdmm_driver, mips_cdmm_driver_register, \
31 mips_cdmm_driver_unregister)
32
33 +/*
34 + * builtin_mips_cdmm_driver() - Helper macro for drivers that don't do anything
35 + * special in init and have no exit. This eliminates some boilerplate. Each
36 + * driver may only use this macro once, and calling it replaces device_initcall
37 + * (or in some cases, the legacy __initcall). This is meant to be a direct
38 + * parallel of module_mips_cdmm_driver() above but without the __exit stuff that
39 + * is not used for builtin cases.
40 + */
41 +#define builtin_mips_cdmm_driver(__mips_cdmm_driver) \
42 + builtin_driver(__mips_cdmm_driver, mips_cdmm_driver_register)
43 +
44 /* drivers/tty/mips_ejtag_fdc.c */
45
46 #ifdef CONFIG_MIPS_EJTAG_FDC_EARLYCON