diff options
author | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2024-10-01 18:09:41 +0200 |
---|---|---|
committer | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2024-10-01 18:09:41 +0200 |
commit | 2cd86f02c017bf9733e5cd891381b7d40f6f37ad (patch) | |
tree | 839e63bdf31a2d1ec68fa8d6fb8dc821f8fcf243 /rust/helpers/workqueue.c | |
parent | abf201f6ce14c4ceeccde5471bdf59614b83a3d8 (diff) | |
parent | 43102a2012c2e2f8424d7eef52aede8e73cf2fed (diff) |
Merge remote-tracking branch 'drm/drm-fixes' into drm-misc-fixes
Required for a panthor fix that broke when
FOP_UNSIGNED_OFFSET was added in place of FMODE_UNSIGNED_OFFSET.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Diffstat (limited to 'rust/helpers/workqueue.c')
-rw-r--r-- | rust/helpers/workqueue.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/rust/helpers/workqueue.c b/rust/helpers/workqueue.c new file mode 100644 index 000000000000..f59427acc323 --- /dev/null +++ b/rust/helpers/workqueue.c @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include <linux/export.h> +#include <linux/workqueue.h> + +void rust_helper_init_work_with_key(struct work_struct *work, work_func_t func, + bool onstack, const char *name, + struct lock_class_key *key) +{ + __init_work(work, onstack); + work->data = (atomic_long_t)WORK_DATA_INIT(); + lockdep_init_map(&work->lockdep_map, name, key, 0); + INIT_LIST_HEAD(&work->entry); + work->func = func; +} |