diff options
Diffstat (limited to 'include/linux/device.h')
| -rw-r--r-- | include/linux/device.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 324d02add7b4..6558af90c8fe 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -909,6 +909,13 @@ static inline void device_lock_assert(struct device *dev) | |||
| 909 | lockdep_assert_held(&dev->mutex); | 909 | lockdep_assert_held(&dev->mutex); |
| 910 | } | 910 | } |
| 911 | 911 | ||
| 912 | static inline struct device_node *dev_of_node(struct device *dev) | ||
| 913 | { | ||
| 914 | if (!IS_ENABLED(CONFIG_OF)) | ||
| 915 | return NULL; | ||
| 916 | return dev->of_node; | ||
| 917 | } | ||
| 918 | |||
| 912 | void driver_init(void); | 919 | void driver_init(void); |
| 913 | 920 | ||
| 914 | /* | 921 | /* |
