From: Paul Mackerras Date: Thu, 13 Dec 2007 04:11:22 +0000 (+1100) Subject: [POWERPC] Convert adb.c to use kthread API and not spin on ADB requests X-Git-Tag: v2.6.25-rc1~1131^2~280 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c61dace9a10a4bc54c764f9f490994a9d7852859;p=pandora-kernel.git [POWERPC] Convert adb.c to use kthread API and not spin on ADB requests This converts adb.c to use the kthread API. It also changes adb_request so that if the ADBREQ_SYNC flag is specified, we now sleep waiting for the request to finish using an on-stack completion rather than spinning. To implement this, we now require that if the ADBREQ_SYNC flag is set, the `done' parameter must be NULL. All of the existing callers of adb_request that pass ADBREQ_SYNC appear to be in process context and have done == NULL. Doing this allows us to get rid of an awful hack in adb_request() where we used to test whether the request was coming from the adb probe task and use a completion if it was, and otherwise spin. This also gets rid of a static request block that was used if the req parameter to adb_request was NULL. None of the callers do that any more, so the static request block is no longer necessary. Signed-off-by: Paul Mackerras --- Reading git-diff-tree failed