summaryrefslogtreecommitdiffstats
path: root/drivers/staging/android
diff options
context:
space:
mode:
authorCorentin Chary2009-11-28 09:45:14 +0100
committerGreg Kroah-Hartman2011-11-30 12:26:09 +0100
commit23687af9317c9c01d4609667d3566af7f5e71e65 (patch)
tree4be19f8334d037e53a2645eb44942384ebff31ea /drivers/staging/android
parentRevert "Staging: android: delete android drivers" (diff)
downloadkernel-qcow2-linux-23687af9317c9c01d4609667d3566af7f5e71e65.tar.gz
kernel-qcow2-linux-23687af9317c9c01d4609667d3566af7f5e71e65.tar.xz
kernel-qcow2-linux-23687af9317c9c01d4609667d3566af7f5e71e65.zip
staging/android: fix build issues
Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/android')
-rw-r--r--drivers/staging/android/logger.c1
-rw-r--r--drivers/staging/android/lowmemorykiller.c6
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/staging/android/logger.c b/drivers/staging/android/logger.c
index 6c10b456c6cc..64cc2a1e7b16 100644
--- a/drivers/staging/android/logger.c
+++ b/drivers/staging/android/logger.c
@@ -17,6 +17,7 @@
* GNU General Public License for more details.
*/
+#include <linux/sched.h>
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/miscdevice.h>
diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c
index 935d281a201a..32314e85e2b7 100644
--- a/drivers/staging/android/lowmemorykiller.c
+++ b/drivers/staging/android/lowmemorykiller.c
@@ -100,15 +100,17 @@ static int lowmem_shrink(int nr_to_scan, gfp_t gfp_mask)
read_lock(&tasklist_lock);
for_each_process(p) {
struct mm_struct *mm;
+ struct signal_struct *sig;
int oom_adj;
task_lock(p);
mm = p->mm;
- if (!mm) {
+ sig = p->signal;
+ if (!mm || !sig) {
task_unlock(p);
continue;
}
- oom_adj = mm->oom_adj;
+ oom_adj = sig->oom_adj;
if (oom_adj < min_adj) {
task_unlock(p);
continue;