diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2025-11-25 12:25:55 +0300 |
|---|---|---|
| committer | Arnd Bergmann <arnd@arndb.de> | 2025-11-25 12:25:56 +0300 |
| commit | d34a71ba21735b6aae34cc8127e70724073f103b (patch) | |
| tree | 70780b2a49b449cde209ab02ee3030b590a325ae /include/linux | |
| parent | 5d5b056ba35257586afda128eafa05780e3d9b63 (diff) | |
| parent | a97fbc3ee3e2a536fafaff04f21f45472db71769 (diff) | |
| download | linux-d34a71ba21735b6aae34cc8127e70724073f103b.tar.xz | |
Merge tag 'tegra-for-6.19-syscore' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/drivers
syscore: Changes for v6.19-rc1
Add a parameter to syscore operations to allow passing contextual data,
which in turn enables refactoring of drivers to make them independent of
global data. This initially only contains the API changes along with the
updates for existing drivers. Subsequent work will make use of this to
improve drivers.
* tag 'tegra-for-6.19-syscore' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
syscore: Pass context data to callbacks
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/syscore_ops.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/include/linux/syscore_ops.h b/include/linux/syscore_ops.h index ae4d48e4c970..ac6d71be5c38 100644 --- a/include/linux/syscore_ops.h +++ b/include/linux/syscore_ops.h @@ -11,14 +11,19 @@ #include <linux/list.h> struct syscore_ops { + int (*suspend)(void *data); + void (*resume)(void *data); + void (*shutdown)(void *data); +}; + +struct syscore { struct list_head node; - int (*suspend)(void); - void (*resume)(void); - void (*shutdown)(void); + const struct syscore_ops *ops; + void *data; }; -extern void register_syscore_ops(struct syscore_ops *ops); -extern void unregister_syscore_ops(struct syscore_ops *ops); +extern void register_syscore(struct syscore *syscore); +extern void unregister_syscore(struct syscore *syscore); #ifdef CONFIG_PM_SLEEP extern int syscore_suspend(void); extern void syscore_resume(void); |
