diff options
| -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 0eb8ee2dc6d1..f3f2c7e38060 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -916,6 +916,13 @@ static inline void device_lock_assert(struct device *dev) | |||
| 916 | lockdep_assert_held(&dev->mutex); | 916 | lockdep_assert_held(&dev->mutex); |
| 917 | } | 917 | } |
| 918 | 918 | ||
| 919 | static inline struct device_node *dev_of_node(struct device *dev) | ||
| 920 | { | ||
| 921 | if (!IS_ENABLED(CONFIG_OF)) | ||
| 922 | return NULL; | ||
| 923 | return dev->of_node; | ||
| 924 | } | ||
| 925 | |||
| 919 | void driver_init(void); | 926 | void driver_init(void); |
| 920 | 927 | ||
| 921 | /* | 928 | /* |
