Re: [PATCH v4 2/3] driver core: make software nodes available earlier

From: Andy Shevchenko

Date: Mon Mar 30 2026 - 16:26:26 EST


On Mon, Mar 30, 2026 at 02:40:47PM +0200, Bartosz Golaszewski wrote:
> Software nodes are currently initialized in a function registered as
> a postcore_initcall(). However, some devices may want to register
> software nodes earlier than that (or also in a postcore_initcall() where
> they're at the merci of the link order). Move the initialization to
> driver_init() making swnode available much earlier as well as making
> their initialization time deterministic.

...

> -static void __exit software_node_exit(void)
> -{
> - ida_destroy(&swnode_root_ids);
> - kset_unregister(swnode_kset);
> }
> -__exitcall(software_node_exit);


Why? What's wrong with the __exitcall?

--
With Best Regards,
Andy Shevchenko