Merge tag 'stable/for-linus-3.6-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel...
[firefly-linux-kernel-4.4.55.git] / include / linux / device.h
index 5083bccae9676779ba4368d84d2672d37e6222ef..52a5f15a2223ecb916391138ca9cb44f5d5d108a 100644 (file)
@@ -691,6 +691,11 @@ struct device {
        struct iommu_group      *iommu_group;
 };
 
+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>