Add the dummy versions (function definition returning -EINVAL) of
drm_of_find_backlight and devm_drm_of_find_backlight in the #else
part of the conditional directive in drm_of.h. This is needed
for drivers where CONFIG_OF is optional.

Signed-off-by: Meghana Madhyastha <meghana.madhyas...@gmail.com>
---
Changes in v4:
-This commit was not present in the previous versions.

 include/drm/drm_of.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/include/drm/drm_of.h b/include/drm/drm_of.h
index b2d6e0c..b11d55b 100644
--- a/include/drm/drm_of.h
+++ b/include/drm/drm_of.h
@@ -60,6 +60,7 @@ static inline int drm_of_encoder_active_endpoint(struct 
device_node *node,
 {
        return -EINVAL;
 }
+
 static inline int drm_of_find_panel_or_bridge(const struct device_node *np,
                                              int port, int endpoint,
                                              struct drm_panel **panel,
@@ -67,6 +68,18 @@ static inline int drm_of_find_panel_or_bridge(const struct 
device_node *np,
 {
        return -EINVAL;
 }
+
+static inline struct backlight_device *drm_of_find_backlight(
+                                       struct device *dev);
+{
+       return -EINVAL;
+}
+
+static inline struct backlight_device *devm_drm_of_find_backlight(
+                                               struct device *dev);
+{
+       return -EINVAL;
+}
 #endif
 
 static inline int drm_of_encoder_active_endpoint_id(struct device_node *node,
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to