Commit aa6aef21 authored by Samuel Ortiz's avatar Samuel Ortiz Committed by Greg Kroah-Hartman

mei: bus: Implement bus driver data setter/getter

MEI drivers should be able to carry their private data around.
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 44d88d91
...@@ -461,6 +461,18 @@ int mei_cl_register_event_cb(struct mei_cl_device *device, ...@@ -461,6 +461,18 @@ int mei_cl_register_event_cb(struct mei_cl_device *device,
} }
EXPORT_SYMBOL_GPL(mei_cl_register_event_cb); EXPORT_SYMBOL_GPL(mei_cl_register_event_cb);
void *mei_cl_get_drvdata(const struct mei_cl_device *device)
{
return dev_get_drvdata(&device->dev);
}
EXPORT_SYMBOL_GPL(mei_cl_get_drvdata);
void mei_cl_set_drvdata(struct mei_cl_device *device, void *data)
{
dev_set_drvdata(&device->dev, data);
}
EXPORT_SYMBOL_GPL(mei_cl_set_drvdata);
void mei_cl_bus_rx_event(struct mei_cl *cl) void mei_cl_bus_rx_event(struct mei_cl *cl)
{ {
struct mei_cl_device *device = cl->device; struct mei_cl_device *device = cl->device;
......
...@@ -35,4 +35,7 @@ int mei_cl_register_event_cb(struct mei_cl_device *device, ...@@ -35,4 +35,7 @@ int mei_cl_register_event_cb(struct mei_cl_device *device,
#define MEI_CL_EVENT_RX 0 #define MEI_CL_EVENT_RX 0
#define MEI_CL_EVENT_TX 1 #define MEI_CL_EVENT_TX 1
void *mei_cl_get_drvdata(const struct mei_cl_device *device);
void mei_cl_set_drvdata(struct mei_cl_device *device, void *data);
#endif /* _LINUX_MEI_CL_BUS_H */ #endif /* _LINUX_MEI_CL_BUS_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment