Skip to content
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

drivers: spi: remove '&' when assigning init_fn #75539

Conversation

ndrs-pst
Copy link
Contributor

@ndrs-pst ndrs-pst commented Jul 6, 2024

Remove address-of operator ('&') when assigning init_fn function pointer in DEVICE_DT_INST_DEFINE macro.

This change aims to maintain consistency among the drivers in drivers/spi, ensuring that all function pointer assignments follow the same pattern.

Remove address-of operator ('&') when assigning `init_fn`
function pointer in `DEVICE_DT_INST_DEFINE` macro.

This change aims to maintain consistency among the drivers in
`drivers/spi`, ensuring that all function pointer assignments
follow the same pattern.

Signed-off-by: Pisit Sawangvonganan <[email protected]>
@ndrs-pst
Copy link
Contributor Author

Since a similar PR (#75538) was merged, I hope this one can be approved as well. 😃

I believe that when we maintain consistency among the files in drivers/spi, new drivers typically reference existing implementations in this folder, allowing us to expect the same pattern.

Copy link
Collaborator

@tbursztyka tbursztyka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

@nashif nashif merged commit dcd0a27 into zephyrproject-rtos:main Aug 8, 2024
23 checks passed
@ndrs-pst ndrs-pst deleted the pr_drivers_spi_remove_`&`_in_`init_fn` branch August 8, 2024 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants