Commit c257aa42 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Driver Model: add dev_get_drvdata() and dev_set_drvdata() functions

parent ce222f9f
......@@ -306,6 +306,18 @@ g_list_to_dev(struct list_head *g_list)
return list_entry(g_list, struct device, g_list);
}
static inline void *
dev_get_drvdata (struct device *dev)
{
return dev->driver_data;
}
static inline void
dev_set_drvdata (struct device *dev, void *data)
{
dev->driver_data = data;
}
/*
* High level routines for use by the bus drivers
*/
......
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