[Kernel] Suspend2 add a member to struct kthread_create_info
As a consequence, all functions related to it now have a new parameter-freezer_flag, as shown in the source code(include header files)
I discovered this when emerging ipw2200 this morning. I failed to emerge it at first.
I am using 2.6.11-nitro0 which was patched with suspend2. However I don't have it compiled in the kernel.
In ipw2200.c, there is a conditional compilation. It will check whether your kernel configuration file has CONFIG_SOFTWARE_SUSPEND2 defined. If yes, it will use with-freezer_flag version of create_workqueue(). Otherwise, it use the vanilla version, ie. the one without freezer_flag.
Apparently, now my kernel configuration file don't have CONFIG_SOFTWARE_SUSPEND2 defined. So when compiling ipw2200.c, the vallia version of create_workqueue() will be used. However header file "include/linux/workqueue.h" is now patched, so gcc will not find the vanilla version of create_workqueue() in it. That's why the compilation would fail.
The solution is easy, just cheat gcc by defining CONFIG_SOFTWARE_SUSPEND2, no need to recompile the kernel.
In a patched kernel source, the struct kthread_create_info should look like:
/* Information passed to kthread() from keventd. */
int (*threadfn)(void *data);
unsigned long freezer_flags;
struct completion started;
/* Result passed back to kthread_create() from keventd. */
struct task_struct *result;
struct completion done;