]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/device.h
Merge remote-tracking branch 'driver-core/driver-core-next'
[karo-tx-linux.git] / include / linux / device.h
index 324d02add7b4d4ea0794ef4fe4adb1826dd36532..6558af90c8fe3b9263441dc401b3689940d3453e 100644 (file)
@@ -909,6 +909,13 @@ static inline void device_lock_assert(struct device *dev)
        lockdep_assert_held(&dev->mutex);
 }
 
+static inline struct device_node *dev_of_node(struct device *dev)
+{
+       if (!IS_ENABLED(CONFIG_OF))
+               return NULL;
+       return dev->of_node;
+}
+
 void driver_init(void);
 
 /*