-
Notifications
You must be signed in to change notification settings - Fork 8.4k
init: Make entry init-function less and introduce service objects #97330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
4ad6c4d to
b592b44
Compare
9642cb2 to
792a13a
Compare
|
Don't know why code guidelines points out issues that are not from my patches, but anyway: added one to make it happy. |
5681c2c to
b04b8cb
Compare
Thanks for fixing! I haven't checked, but with your verification and if nobody else complains that their build is broken, I think chances are good that this will work indeed. |
Since the addition of deinit operation in device, init and deinit have been within each device, rendering their init entry's init function useless. In order to save ROM space, let's remove the init function from init entry altogether, and introduce a new object called "service" which owns an init function to go along with SYS_INIT/SYS_INIT_NAMED. Signed-off-by: Tomasz Bursztyka <[email protected]>
As the pointer has been removed from struct init_entry, it should be looked up in the pointed object instead, as it has been done already for device objects. Signed-off-by: Tomasz Bursztyka <[email protected]>
Following the changes on struct init_entry Signed-off-by: Tomasz Bursztyka <[email protected]>
struct init_entry may point to a struct device or a struct service, each ones belonging to device or service iterable section. Service section being newly added, handling it in cmake relevantly. Signed-off-by: Tomasz Bursztyka <[email protected]>
To make CI happier. Signed-off-by: Tomasz Bursztyka <[email protected]>
b04b8cb to
5a08a40
Compare
|



Found some time so re-posting the previously merged then reverted PR #90014
Beside that, no changes.