-
Notifications
You must be signed in to change notification settings - Fork 349
Init component's back pointer to its driver early #2408
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
src/audio/component.c
Outdated
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.
This comment is confusing here. Since cdev->drv is already set, I think it is better to remove this assignment.
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.
Done
|
@mmaka1 PR looks good to me. See one comment inline. It's a pity that we need to change the API but I don't see other solution. |
c78cf8f to
2c7627b
Compare
Missed drv pointer as the first parameter Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Missed drv pointer as the first parameter Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
Back pointer must be initialized before any instance level logging is performed by the new() operation since the instance identification requires access to the uuid that will be implemented on the component driver level. Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2c7627b to
8c35b95
Compare
|
I don't like the terminology "back pointer", at least for me it is more confusing than revealing. Just say "pointer to driver" or something similar. Other than that, LGTM. |
Why confusing? Just look at the back pointer definition plus assume that the aggregation (and its direction) exists in the model even if not explicitly reflected in the source code, then this term should be obvious. |
|
Yeah, I guess. Still I won't use such terminology myself because it's way too far from being intuitive for me to easily understand it. |
|
@paulstelian97 @mmaka1 please have this discussion over a beer or something. :) |
code is like jokes, if you need explanations it's not funny. |
Back pointer must be initialized before any instance
level logging is performed by the new() operation since
the instance identification requires access to the uuid
that will be implemented on the component driver level.