From 42335c65bc0810433f5b327bd601def3cf30ab2c Mon Sep 17 00:00:00 2001 From: Noob Zhang <17194552+zhanghua000@users.noreply.github.com> Date: Sat, 24 Dec 2022 12:50:18 +0000 Subject: [PATCH] Fix build on 6.1 kernel See https://github.com/torvalds/linux/commit/f5d39b020809146cc28e6e73369bf8065e0310aa for more info. --- binder/binder.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/binder/binder.c b/binder/binder.c index a7e620b..404c32e 100644 --- a/binder/binder.c +++ b/binder/binder.c @@ -4109,7 +4109,9 @@ static int binder_wait_for_work(struct binder_thread *thread, struct binder_proc *proc = thread->proc; int ret = 0; +#if LINUX_VERSION_CODE <= KERNEL_VERSION(6,0,0) freezer_do_not_count(); +#endif binder_inner_proc_lock(proc); for (;;) { prepare_to_wait(&thread->wait, &wait, TASK_INTERRUPTIBLE); @@ -4129,7 +4131,9 @@ static int binder_wait_for_work(struct binder_thread *thread, } finish_wait(&thread->wait, &wait); binder_inner_proc_unlock(proc); +#if LINUX_VERSION_CODE <= KERNEL_VERSION(6,0,0) freezer_count(); +#endif return ret; }