Skip to content

Commit 82c43ba

Browse files
LATENTBOUNCEmathieupoirier
authored andcommitted
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>
1 parent 6de23f8 commit 82c43ba

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/rpmsg/rpmsg_core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ static int __init rpmsg_init(void)
650650
ret = bus_register(&rpmsg_bus);
651651
if (ret) {
652652
pr_err("failed to register rpmsg bus: %d\n", ret);
653-
class_destroy(&rpmsg_class);
653+
class_unregister(&rpmsg_class);
654654
}
655655
return ret;
656656
}
@@ -659,7 +659,7 @@ postcore_initcall(rpmsg_init);
659659
static void __exit rpmsg_fini(void)
660660
{
661661
bus_unregister(&rpmsg_bus);
662-
class_destroy(&rpmsg_class);
662+
class_unregister(&rpmsg_class);
663663
}
664664
module_exit(rpmsg_fini);
665665

0 commit comments

Comments
 (0)