diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2013-03-27 11:29:59 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-29 11:45:59 -0400 |
commit | aa6aef216f8aea1a00b56aafc29b8745237a9b62 (patch) | |
tree | 3f237c64519756a25b17686c6eca59d2b5fcf565 | |
parent | 44d88d919261256e3bd999cde05572c8c4afb642 (diff) |
mei: bus: Implement bus driver data setter/getter
MEI drivers should be able to carry their private data around.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/misc/mei/bus.c | 12 | ||||
-rw-r--r-- | include/linux/mei_cl_bus.h | 3 |
2 files changed, 15 insertions, 0 deletions
diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c index 2b4b5b3f639f..8dbcb1516dc6 100644 --- a/drivers/misc/mei/bus.c +++ b/drivers/misc/mei/bus.c | |||
@@ -461,6 +461,18 @@ int mei_cl_register_event_cb(struct mei_cl_device *device, | |||
461 | } | 461 | } |
462 | EXPORT_SYMBOL_GPL(mei_cl_register_event_cb); | 462 | EXPORT_SYMBOL_GPL(mei_cl_register_event_cb); |
463 | 463 | ||
464 | void *mei_cl_get_drvdata(const struct mei_cl_device *device) | ||
465 | { | ||
466 | return dev_get_drvdata(&device->dev); | ||
467 | } | ||
468 | EXPORT_SYMBOL_GPL(mei_cl_get_drvdata); | ||
469 | |||
470 | void mei_cl_set_drvdata(struct mei_cl_device *device, void *data) | ||
471 | { | ||
472 | dev_set_drvdata(&device->dev, data); | ||
473 | } | ||
474 | EXPORT_SYMBOL_GPL(mei_cl_set_drvdata); | ||
475 | |||
464 | void mei_cl_bus_rx_event(struct mei_cl *cl) | 476 | void mei_cl_bus_rx_event(struct mei_cl *cl) |
465 | { | 477 | { |
466 | struct mei_cl_device *device = cl->device; | 478 | struct mei_cl_device *device = cl->device; |
diff --git a/include/linux/mei_cl_bus.h b/include/linux/mei_cl_bus.h index d9958c3960a2..1bece18825ba 100644 --- a/include/linux/mei_cl_bus.h +++ b/include/linux/mei_cl_bus.h | |||
@@ -35,4 +35,7 @@ int mei_cl_register_event_cb(struct mei_cl_device *device, | |||
35 | #define MEI_CL_EVENT_RX 0 | 35 | #define MEI_CL_EVENT_RX 0 |
36 | #define MEI_CL_EVENT_TX 1 | 36 | #define MEI_CL_EVENT_TX 1 |
37 | 37 | ||
38 | void *mei_cl_get_drvdata(const struct mei_cl_device *device); | ||
39 | void mei_cl_set_drvdata(struct mei_cl_device *device, void *data); | ||
40 | |||
38 | #endif /* _LINUX_MEI_CL_BUS_H */ | 41 | #endif /* _LINUX_MEI_CL_BUS_H */ |