summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <greg@kroah.com>2002-09-16 00:15:26 -0700
committerGreg Kroah-Hartman <greg@kroah.com>2002-09-16 00:15:26 -0700
commitc257aa42f74d69d760ef234c7d416ab2270bc582 (patch)
tree25766fc16659cc5ce431564292bdf263d45bfea4
parentce222f9f7eb715b67e1989452360ef2d36326587 (diff)
Driver Model: add dev_get_drvdata() and dev_set_drvdata() functions
-rw-r--r--include/linux/device.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 9b310071cb41..21f789350502 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -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
*/