diff options
author | Hitoshi Mitake <h.mitake@gmail.com> | 2008-04-29 04:03:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 11:06:26 -0400 |
commit | c3c52bce6993c6d37af2c2de9b482a7013d646a7 (patch) | |
tree | dc03a88574a0029af51aad044c449cb90e52247f /include | |
parent | 1a45027d1afd7e85254b5ef8535e93ce3d588cf4 (diff) |
edac: fix module initialization on several modules 2nd time
I implemented opstate_init() as a inline function in linux/edac.h.
added calling opstate_init() to:
i82443bxgx_edac.c
i82860_edac.c
i82875p_edac.c
i82975x_edac.c
I wrote a fixed patch of
edac-fix-module-initialization-on-several-modules.patch,
and tested building 2.6.25-rc7 with applying this. It was succeed.
I think the patch is now correct.
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
Signed-off-by: Doug Thompson <dougthompson@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/edac.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/linux/edac.h b/include/linux/edac.h index eab451e69a91..7cf92e8a4196 100644 --- a/include/linux/edac.h +++ b/include/linux/edac.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Author: Dave Jiang <djiang@mvista.com> | 4 | * Author: Dave Jiang <djiang@mvista.com> |
5 | * | 5 | * |
6 | * 2006-2007 (c) MontaVista Software, Inc. This file is licensed under | 6 | * 2006-2008 (c) MontaVista Software, Inc. This file is licensed under |
7 | * the terms of the GNU General Public License version 2. This program | 7 | * the terms of the GNU General Public License version 2. This program |
8 | * is licensed "as is" without any warranty of any kind, whether express | 8 | * is licensed "as is" without any warranty of any kind, whether express |
9 | * or implied. | 9 | * or implied. |
@@ -26,4 +26,16 @@ extern atomic_t edac_handlers; | |||
26 | extern int edac_handler_set(void); | 26 | extern int edac_handler_set(void); |
27 | extern void edac_atomic_assert_error(void); | 27 | extern void edac_atomic_assert_error(void); |
28 | 28 | ||
29 | static inline void opstate_init(void) | ||
30 | { | ||
31 | switch (edac_op_state) { | ||
32 | case EDAC_OPSTATE_POLL: | ||
33 | case EDAC_OPSTATE_NMI: | ||
34 | break; | ||
35 | default: | ||
36 | edac_op_state = EDAC_OPSTATE_POLL; | ||
37 | } | ||
38 | return; | ||
39 | } | ||
40 | |||
29 | #endif | 41 | #endif |