aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/device.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/device.h')
-rw-r--r--include/linux/device.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 5083bccae967..52a5f15a2223 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -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>