summaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/fault.c
diff options
context:
space:
mode:
authorKirill A. Shutemov <kirill@shutemov.name>2010-07-22 13:18:19 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-07-27 10:48:34 +0100
commit6338a6aa7c082f11d55712251e14178c68bf5869 (patch)
tree4d85f1401efd41757741388e4b6a3801fa8d4d8b /arch/arm/mm/fault.c
parent3dc91aff9c3ef54b15cdaf32f61f973489fe69eb (diff)
downloadlinux-6338a6aa7c082f11d55712251e14178c68bf5869.tar.bz2
ARM: 6269/1: Add 'code' parameter for hook_fault_code()
Add one more parameter to hook_fault_code() to be able to set 'code' field of struct fsr_info. Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/fault.c')
-rw-r--r--arch/arm/mm/fault.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index ce6f3a422c81..84131c832430 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -508,13 +508,15 @@ static struct fsr_info {
void __init
hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, struct pt_regs *),
- int sig, const char *name)
+ int sig, int code, const char *name)
{
- if (nr >= 0 && nr < ARRAY_SIZE(fsr_info)) {
- fsr_info[nr].fn = fn;
- fsr_info[nr].sig = sig;
- fsr_info[nr].name = name;
- }
+ if (nr < 0 || nr >= ARRAY_SIZE(fsr_info))
+ BUG();
+
+ fsr_info[nr].fn = fn;
+ fsr_info[nr].sig = sig;
+ fsr_info[nr].code = code;
+ fsr_info[nr].name = name;
}
/*