api: ipm: Pass the ipm device as first parameter to callback
Let's normalize the callback like it is done in other APIs. This will avoid the need to do not so nice code (storing the ipm device pointer as global, or else) and more importantly will help to move all device instance to constant. Fixes #26923 Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
a4c9801c1c
commit
e4479f907f
1 changed files with 6 additions and 4 deletions
|
@ -35,14 +35,16 @@ extern "C" {
|
|||
* interrupt-safe APIS. Registration of callbacks is done via
|
||||
* @a ipm_register_callback
|
||||
*
|
||||
* @param "void *context" Arbitrary context pointer provided at
|
||||
* @param ipmdev Driver instance
|
||||
* @param context Arbitrary context pointer provided at
|
||||
* registration time.
|
||||
* @param "uint32_t id" Message type identifier.
|
||||
* @param "volatile void *data" Message data pointer. The correct
|
||||
* @param id Message type identifier.
|
||||
* @param data Message data pointer. The correct
|
||||
* amount of data to read out
|
||||
* must be inferred using the message id/upper level protocol.
|
||||
*/
|
||||
typedef void (*ipm_callback_t)(void *context, uint32_t id, volatile void *data);
|
||||
typedef void (*ipm_callback_t)(struct device *ipmdev, void *context,
|
||||
uint32_t id, volatile void *data);
|
||||
|
||||
/**
|
||||
* @typedef ipm_send_t
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue