diff options
| author | Jori Koolstra <jkoolstra@xs4all.nl> | 2026-03-08 15:08:49 +0100 |
|---|---|---|
| committer | Mathieu Poirier <mathieu.poirier@linaro.org> | 2026-03-09 08:33:28 -0600 |
| commit | 82c43bae4778c5b80df02e3df03dfcc21de3bb76 (patch) | |
| tree | e93afae0d3242ff80f3efa0e7d55641df0d14466 | |
| parent | 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f (diff) | |
drivers: rpmsg: class_destroy() is deprecated
The class_destroy() function documents that:
Note, the pointer to be destroyed must have been created with a call
to class_create().
However, class_create() is deprecated. rpmsg already uses
class_register() but the class_destroy() calls should also be replaced
with class_unregister().
Link: https://lore.kernel.org/all/2023040244-duffel-pushpin-f738@gregkh/
Signed-off-by: Jori Koolstra <jkoolstra@xs4all.nl>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20260308140850.1138376-1-jkoolstra@xs4all.nl
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
| -rw-r--r-- | drivers/rpmsg/rpmsg_core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/rpmsg/rpmsg_core.c b/drivers/rpmsg/rpmsg_core.c index 96964745065b..948541656950 100644 --- a/drivers/rpmsg/rpmsg_core.c +++ b/drivers/rpmsg/rpmsg_core.c @@ -650,7 +650,7 @@ static int __init rpmsg_init(void) ret = bus_register(&rpmsg_bus); if (ret) { pr_err("failed to register rpmsg bus: %d\n", ret); - class_destroy(&rpmsg_class); + class_unregister(&rpmsg_class); } return ret; } @@ -659,7 +659,7 @@ postcore_initcall(rpmsg_init); static void __exit rpmsg_fini(void) { bus_unregister(&rpmsg_bus); - class_destroy(&rpmsg_class); + class_unregister(&rpmsg_class); } module_exit(rpmsg_fini); |
