[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1360694222-27632-9-git-send-email-sameo@linux.intel.com>
Date: Tue, 12 Feb 2013 19:36:58 +0100
From: Samuel Ortiz <sameo@...ux.intel.com>
To: gregkh@...uxfoundation.org
Cc: arnd@...db.de, linux-kernel@...r.kernel.org,
tomas.winkler@...el.com, Samuel Ortiz <sameo@...ux.intel.com>
Subject: [char-misc-next 08/12 v3] 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@...ux.intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@...el.com>
---
drivers/misc/mei/bus.c | 12 ++++++++++++
include/linux/mei_bus.h | 3 +++
2 files changed, 15 insertions(+)
diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c
index 85ca872..163da66 100644
--- a/drivers/misc/mei/bus.c
+++ b/drivers/misc/mei/bus.c
@@ -440,6 +440,18 @@ int mei_register_event_cb(struct mei_device *device,
}
EXPORT_SYMBOL_GPL(mei_register_event_cb);
+void *mei_get_clientdata(const struct mei_device *device)
+{
+ return dev_get_drvdata(&device->dev);
+}
+EXPORT_SYMBOL_GPL(mei_get_clientdata);
+
+void mei_set_clientdata(struct mei_device *device, void *data)
+{
+ dev_set_drvdata(&device->dev, data);
+}
+EXPORT_SYMBOL_GPL(mei_set_clientdata);
+
void mei_bus_rx_event(struct mei_cl *cl)
{
struct mei_device *device = cl->device;
diff --git a/include/linux/mei_bus.h b/include/linux/mei_bus.h
index 4ce6301..e14182a 100644
--- a/include/linux/mei_bus.h
+++ b/include/linux/mei_bus.h
@@ -106,4 +106,7 @@ typedef void (*mei_event_cb_t)(struct mei_device *device,
int mei_register_event_cb(struct mei_device *device,
mei_event_cb_t read_cb, void *context);
+void *mei_get_clientdata(const struct mei_device *device);
+void mei_set_clientdata(struct mei_device *device, void *data);
+
#endif /* _LINUX_MEI_BUS_H */
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists