From 71ce789115f878a07e4a6c43d6006cea6aee1078 Mon Sep 17 00:00:00 2001 From: Tomas Winkler Date: Thu, 23 Jul 2015 15:08:43 +0300 Subject: mei: bus: enable running fixup routines before device registration Split the device registration into allocation and device struct initialization, device setup, and the final device registration. This why it is possible to run fixups and quirks during the setup stage on an initialized device. Each fixup routine effects do_match flag. If the flag is set to false at the end the device won't be registered on the bus. Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman --- include/linux/mei_cl_bus.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/linux/mei_cl_bus.h') diff --git a/include/linux/mei_cl_bus.h b/include/linux/mei_cl_bus.h index 85239138251c..81ab56dd0ae0 100644 --- a/include/linux/mei_cl_bus.h +++ b/include/linux/mei_cl_bus.h @@ -29,6 +29,8 @@ typedef void (*mei_cl_event_cb_t)(struct mei_cl_device *device, * events (e.g. Rx buffer pending) notifications. * @event_context: event callback run context * @events: Events bitmask sent to the driver. + * + * @do_match: wheather device can be matched with a driver * @is_added: device is already scanned * @priv_data: client private data */ @@ -45,6 +47,8 @@ struct mei_cl_device { mei_cl_event_cb_t event_cb; void *event_context; unsigned long events; + + unsigned int do_match:1; unsigned int is_added:1; void *priv_data; -- cgit v1.2.3