@@ -649,19 +649,9 @@ static int of_parent_match(struct device *dev, const void *data)
return dev->parent && dev->parent->of_node == data;
}
-/**
- * of_find_backlight_by_node() - find backlight device by device-tree node
- * @node: device-tree node of the backlight device
- *
- * Returns a pointer to the backlight device corresponding to the given DT
- * node or NULL if no such backlight device exists or if the device hasn't
- * been probed yet.
- *
- * This function obtains a reference on the backlight device and it is the
- * caller's responsibility to drop the reference by calling put_device() on
- * the backlight device's .dev field.
- */
-struct backlight_device *of_find_backlight_by_node(struct device_node *node)
+/* Find backlight device by device-tree node */
+static struct backlight_device *
+of_find_backlight_by_node(struct device_node *node)
{
struct device *dev;
@@ -669,7 +659,12 @@ struct backlight_device *of_find_backlight_by_node(struct device_node *node)
return dev ? to_backlight_device(dev) : NULL;
}
-EXPORT_SYMBOL(of_find_backlight_by_node);
+#else
+static struct backlight_device *
+of_find_backlight_by_node(struct device_node *node)
+{
+ return NULL;
+}
#endif
static struct backlight_device *of_find_backlight(struct device *dev)
@@ -466,16 +466,6 @@ static inline void * bl_get_data(struct backlight_device *bl_dev)
return dev_get_drvdata(&bl_dev->dev);
}
-#ifdef CONFIG_OF
-struct backlight_device *of_find_backlight_by_node(struct device_node *node);
-#else
-static inline struct backlight_device *
-of_find_backlight_by_node(struct device_node *node)
-{
- return NULL;
-}
-#endif
-
#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
struct backlight_device *devm_of_find_backlight(struct device *dev);
#else