diff options
| author | Eric Tashakkor <w36098@motorola.com> | 2014-05-21 08:38:12 -0500 |
|---|---|---|
| committer | ERIC TASHAKKOR <w36098@motorola.com> | 2014-05-27 14:22:57 +0000 |
| commit | 024080a8aa7765f08d836d0322d80708361875d3 (patch) | |
| tree | 0ddf8d5785e3d21aed6253445ce20328802d869c /include/linux/m4sensorhub.h | |
| parent | 80eb3fbe8d147db15182cebbb937486945900be9 (diff) | |
| download | olio-linux-3.10-024080a8aa7765f08d836d0322d80708361875d3.tar.xz olio-linux-3.10-024080a8aa7765f08d836d0322d80708361875d3.zip | |
IKXCLOCK-1349 Fix Kernel Panics in M4 Core
Fixed several panics caused by missing NULL checks in exported core functions
(e.g., M4 fails to init but an outside process calls the sysfs interface)
Fixed/added error messages to check for bad conditions earlier
Fixed a bug in m4sensorhub-irq where IRQ book-keeping was not being done
Added missing callback string to m4sensorhub-panic.c
Change-Id: I82a8602f2327bf63982caa23af103c48a01bbcc1
Signed-off-by: Eric Tashakkor <w36098@motorola.com>
Diffstat (limited to 'include/linux/m4sensorhub.h')
| -rw-r--r-- | include/linux/m4sensorhub.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/include/linux/m4sensorhub.h b/include/linux/m4sensorhub.h index 4b0cdd62eb8..0559eb980f0 100644 --- a/include/linux/m4sensorhub.h +++ b/include/linux/m4sensorhub.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Motorola, Inc. All Rights Reserved. + * Copyright (c) 2012-2014, Motorola, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -37,10 +37,6 @@ extern char m4sensorhub_debug; printk(KERN_CRIT format, ##s); \ } while (0) -#define CHECK_REG_ACCESS_RETVAL(m4sensorhub, retval, reg) \ - ((retval == m4sensorhub_reg_getsize(m4sensorhub, reg)) \ - ? 0 : -EFAULT); - enum m4sensorhub_debug_level { M4SH_NODEBUG = 0x0, M4SH_CRITICAL, @@ -68,11 +64,15 @@ enum m4sensorhub_bootmode { /* This enum is used to register M4 panic callback * The sequence of this enum is also the sequence of calling * i.e. it will be called follow this enum 0, 1, 2 ... max -*/ + */ enum m4sensorhub_panichdl_index { PANICHDL_DISPLAY_RESTORE, - /* Please add enum before PANICHDL_IRQ_RESTORE - to make sure IRQ resotre will be called at last + /* + * Please add enum before PANICHDL_IRQ_RESTORE + * to make sure IRQ restore will be called last. + * + * Also, add your debug string name to + * m4sensorhub-panic.c. */ PANICHDL_IRQ_RESTORE, /* Keep it as the last one */ PANICHDL_MAX = PANICHDL_IRQ_RESTORE+1 @@ -226,4 +226,3 @@ int m4sensorhub_irq_disable_all(struct m4sensorhub_data *m4sensorhub); #endif /* __KERNEL__ */ #endif /* __M4SENSORHUB_H__ */ - |