driver-core: Move kobj_to_dev from genhd.h to device.h
[deliverable/linux.git] / include / linux / device.h
index 161d96241b1b4da3b9a0909749709a33bcca33c5..5c4495c8fe3facdf11a03d6cea379236e146f108 100644 (file)
@@ -689,6 +689,11 @@ struct device {
        void    (*release)(struct device *dev);
 };
 
+static inline struct device *kobj_to_dev(struct kobject *kobj)
+{
+       return container_of(kobj, struct device, kobj);
+}
+
 /* Get the wakeup routines, which depend on struct device */
 #include <linux/pm_wakeup.h>
 
This page took 0.027333 seconds and 5 git commands to generate.