ipm: Callback's user data has to be called user_data
s/context/user_data Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
858ac4d9ba
commit
0d4477604a
1 changed files with 9 additions and 10 deletions
|
@ -36,14 +36,13 @@ extern "C" {
|
|||
* @a ipm_register_callback
|
||||
*
|
||||
* @param ipmdev Driver instance
|
||||
* @param context Arbitrary context pointer provided at
|
||||
* registration time.
|
||||
* @param user_data Pointer to some private data provided at registration
|
||||
* time.
|
||||
* @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.
|
||||
* @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)(struct device *ipmdev, void *context,
|
||||
typedef void (*ipm_callback_t)(struct device *ipmdev, void *user_data,
|
||||
uint32_t id, volatile void *data);
|
||||
|
||||
/**
|
||||
|
@ -77,7 +76,7 @@ typedef uint32_t (*ipm_max_id_val_get_t)(struct device *ipmdev);
|
|||
* See @a ipm_register_callback() for argument definitions.
|
||||
*/
|
||||
typedef void (*ipm_register_callback_t)(struct device *port, ipm_callback_t cb,
|
||||
void *cb_context);
|
||||
void *user_data);
|
||||
|
||||
/**
|
||||
* @typedef ipm_set_enabled_t
|
||||
|
@ -147,16 +146,16 @@ static inline int z_impl_ipm_send(struct device *ipmdev, int wait, uint32_t id,
|
|||
*
|
||||
* @param ipmdev Driver instance pointer.
|
||||
* @param cb Callback function to execute on incoming message interrupts.
|
||||
* @param context Application-specific context pointer which will be passed
|
||||
* @param user_data Application-specific data pointer which will be passed
|
||||
* to the callback function when executed.
|
||||
*/
|
||||
static inline void ipm_register_callback(struct device *ipmdev,
|
||||
ipm_callback_t cb, void *context)
|
||||
ipm_callback_t cb, void *user_data)
|
||||
{
|
||||
const struct ipm_driver_api *api =
|
||||
(const struct ipm_driver_api *)ipmdev->driver_api;
|
||||
|
||||
api->register_callback(ipmdev, cb, context);
|
||||
api->register_callback(ipmdev, cb, user_data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue