bus = cldev->bus;
if (cldev->event_cb)
- cldev->event_cb(cldev, cldev->events, cldev->event_context);
+ cldev->event_cb(cldev, cldev->events);
cldev->events = 0;
* @cldev: me client devices
* @event_cb: callback function
* @events_mask: requested events bitmask
- * @context: driver context data
*
* Return: 0 on success
* -EALREADY if an callback is already registered
*/
int mei_cldev_register_event_cb(struct mei_cl_device *cldev,
unsigned long events_mask,
- mei_cldev_event_cb_t event_cb, void *context)
+ mei_cldev_event_cb_t event_cb)
{
struct mei_device *bus = cldev->bus;
int ret;
cldev->events = 0;
cldev->events_mask = events_mask;
cldev->event_cb = event_cb;
- cldev->event_context = context;
INIT_WORK(&cldev->event_work, mei_cl_bus_event_work);
if (cldev->events_mask & BIT(MEI_CL_EVENT_RX)) {
}
-static void nfc_mei_event_cb(struct mei_cl_device *cldev, u32 events,
- void *context)
+static void nfc_mei_event_cb(struct mei_cl_device *cldev, u32 events)
{
struct nfc_mei_phy *phy = mei_cldev_get_drvdata(cldev);
}
r = mei_cldev_register_event_cb(phy->cldev, BIT(MEI_CL_EVENT_RX),
- nfc_mei_event_cb, phy);
+ nfc_mei_event_cb);
if (r) {
pr_err("Event cb registration failed %d\n", r);
goto err;
*
* @cldev: bus device
* @events: event mask
- * @context: callback context
*/
-static void mei_wdt_event(struct mei_cl_device *cldev,
- u32 events, void *context)
+static void mei_wdt_event(struct mei_cl_device *cldev, u32 events)
{
if (events & BIT(MEI_CL_EVENT_RX))
mei_wdt_event_rx(cldev);
ret = mei_cldev_register_event_cb(wdt->cldev,
BIT(MEI_CL_EVENT_RX) |
BIT(MEI_CL_EVENT_NOTIF),
- mei_wdt_event, NULL);
+ mei_wdt_event);
/* on legacy devices notification is not supported
* this doesn't fail the registration for RX event
struct mei_device;
typedef void (*mei_cldev_event_cb_t)(struct mei_cl_device *cldev,
- u32 events, void *context);
+ u32 events);
/**
* struct mei_cl_device - MEI device handle
* @event_work: async work to execute event callback
* @event_cb: Drivers register this callback to get asynchronous ME
* events (e.g. Rx buffer pending) notifications.
- * @event_context: event callback run context
* @events_mask: Events bit mask requested by driver.
* @events: Events bitmask sent to the driver.
*
struct work_struct event_work;
mei_cldev_event_cb_t event_cb;
- void *event_context;
unsigned long events_mask;
unsigned long events;
int mei_cldev_register_event_cb(struct mei_cl_device *cldev,
unsigned long event_mask,
- mei_cldev_event_cb_t read_cb, void *context);
+ mei_cldev_event_cb_t read_cb);
#define MEI_CL_EVENT_RX 0
#define MEI_CL_EVENT_TX 1