From: Johannes Berg <[email protected]>

This will be needed by the devcoredump backport.

Signed-off-by: Johannes Berg <[email protected]>
---
 backport/backport-include/linux/device.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/backport/backport-include/linux/device.h 
b/backport/backport-include/linux/device.h
index 830105df33fd..41f06c39d487 100644
--- a/backport/backport-include/linux/device.h
+++ b/backport/backport-include/linux/device.h
@@ -110,6 +110,12 @@ backport_device_release_driver(struct device *dev)
        device_unlock(dev);
 }
 #define device_release_driver LINUX_BACKPORT(device_release_driver)
+
+#define kobj_to_dev LINUX_BACKPORT(kobj_to_dev)
+static inline struct device *kobj_to_dev(struct kobject *kobj)
+{
+       return container_of(kobj, struct device, kobj);
+}
 #endif /* LINUX_VERSION_CODE <= KERNEL_VERSION(3,6,0) */
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0) && RHEL_RELEASE_CODE < 
RHEL_RELEASE_VERSION(7,0)
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe backports" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to