]> git.hungrycats.org Git - linux/commitdiff
Driver Model: add dev_get_drvdata() and dev_set_drvdata() functions
authorGreg Kroah-Hartman <greg@kroah.com>
Mon, 16 Sep 2002 07:15:26 +0000 (00:15 -0700)
committerGreg Kroah-Hartman <greg@kroah.com>
Mon, 16 Sep 2002 07:15:26 +0000 (00:15 -0700)
include/linux/device.h

index 9b310071cb4187fc25d4ebe1dba3c85ddf94641f..21f789350502edfe92fc657084b97193216c19ee 100644 (file)
@@ -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
  */