Module Name: src
Committed By: riastradh
Date: Sun Dec 19 01:16:21 UTC 2021
Modified Files:
src/sys/external/bsd/drm2/include/linux: timer.h
Log Message:
Update Linux timer API from ulong cookie to container_of.
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/drm2/include/linux/timer.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/bsd/drm2/include/linux/timer.h
diff -u src/sys/external/bsd/drm2/include/linux/timer.h:1.7 src/sys/external/bsd/drm2/include/linux/timer.h:1.8
--- src/sys/external/bsd/drm2/include/linux/timer.h:1.7 Sun Oct 13 22:32:09 2019
+++ src/sys/external/bsd/drm2/include/linux/timer.h Sun Dec 19 01:16:21 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: timer.h,v 1.7 2019/10/13 22:32:09 christos Exp $ */
+/* $NetBSD: timer.h,v 1.8 2021/12/19 01:16:21 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -47,16 +47,18 @@ struct timer_list {
struct callout tl_callout;
};
+#define from_timer(V, T, F) container_of(T, __typeof__(*(V)), F)
+
static inline void
-setup_timer(struct timer_list *timer, void (*fn)(unsigned long),
- unsigned long arg)
+timer_setup(struct timer_list *timer, void (*fn)(struct timer_list *),
+ unsigned flags)
{
callout_init(&timer->tl_callout, 0);
/* XXX Super-sketchy casts! */
callout_setfunc(&timer->tl_callout, (void (*)(void *))(void *)fn,
- (void *)(uintptr_t)arg);
+ (void *)arg);
}
static inline void