-
Notifications
You must be signed in to change notification settings - Fork 8k
drivers: tdk: Define the trigger as a pointer to allow dereferencing within the trigger handler callback. #97151
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
Conversation
a6ae71e
to
05e67b8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix!
188cad6
to
6347062
Compare
@janchri can you please update the commit message to indicate it |
Do I add this in the body of the commit message? |
053bbc7
to
6347062
Compare
…R_OF Allows CONTAINER_OF inside trigger handler to be used to obtain a valid ptr to the composite struct consisting of a struct sensor_trigger trig. Fixes zephyrproject-rtos#97124 Signed-off-by: Christoph Jans <[email protected]>
6347062
to
9b07667
Compare
Included the fix inside the commit body message. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the commit title be one line or is it okay splitting it as it is in this PR?
This is a proposal to fix the issue with CONTAINER_OF dereferencing in the trigger handler (see the following issue: #97124).
With this fix, it is possible to define a custom-made
and by setting
sensor_trigger_set(dev, &sdevice.trigger, handler)
while initialisation, access inhandler()
viaCONTAINER_OF
to the underlyingstruct sdevice
is granted.fixes: #97124