]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
driver core: device.h: Group of_node handling declarations and definitions
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 31 May 2024 14:51:29 +0000 (17:51 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Jun 2024 16:04:36 +0000 (18:04 +0200)
There are a few of_node related APIs defined in the driver core.
Group the respective declarations and definitions in the header.
There is no functional change.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240531145129.1506733-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/device.h

index fc3bd7116ab9cd3e9ab2d207a9219b8425d09ed6..56f26642922939ed7b6802f38a38741d7b1b157d 100644 (file)
@@ -1031,13 +1031,6 @@ 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) || !dev)
-               return NULL;
-       return dev->of_node;
-}
-
 static inline bool dev_has_sync_state(struct device *dev)
 {
        if (!dev)
@@ -1144,10 +1137,18 @@ void unlock_device_hotplug(void);
 int lock_device_hotplug_sysfs(void);
 int device_offline(struct device *dev);
 int device_online(struct device *dev);
+
 void set_primary_fwnode(struct device *dev, struct fwnode_handle *fwnode);
 void set_secondary_fwnode(struct device *dev, struct fwnode_handle *fwnode);
-void device_set_of_node_from_dev(struct device *dev, const struct device *dev2);
 void device_set_node(struct device *dev, struct fwnode_handle *fwnode);
+void device_set_of_node_from_dev(struct device *dev, const struct device *dev2);
+
+static inline struct device_node *dev_of_node(struct device *dev)
+{
+       if (!IS_ENABLED(CONFIG_OF) || !dev)
+               return NULL;
+       return dev->of_node;
+}
 
 static inline int dev_num_vf(struct device *dev)
 {