Fix implementation of the DECLARE_WORK() macro in the LinuxKPI to fully
initialize the declared work structure and not only the function callback pointer. MFC after: 1 week Sponsored by: Mellanox Technologies
This commit is contained in:
parent
50afb2f892
commit
9919065078
@ -72,8 +72,13 @@ struct work_struct {
|
||||
atomic_t state;
|
||||
};
|
||||
|
||||
#define DECLARE_WORK(name, fn) \
|
||||
struct work_struct name = { .func = (fn) }
|
||||
#define DECLARE_WORK(name, fn) \
|
||||
struct work_struct name; \
|
||||
static void name##_init(void *arg) \
|
||||
{ \
|
||||
INIT_WORK(&name, fn); \
|
||||
} \
|
||||
SYSINIT(name, SI_SUB_LOCK, SI_ORDER_SECOND, name##_init, NULL)
|
||||
|
||||
struct delayed_work {
|
||||
struct work_struct work;
|
||||
|
Loading…
Reference in New Issue
Block a user