[PATCH v5 3/4] drm/tinydrm: Add the dummy versions of drm_of_find_backlight functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.madhyastha@xxxxxxxxx>
---
Changes in v5:
-Fix the kbuild errors and warnings such as return 0 instead of -EINVAL.

 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..55c9304 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 0;
+}
+
+static inline struct backlight_device *devm_drm_of_find_backlight(
+						struct device *dev)
+{
+	return 0;
+}
 #endif
 
 static inline int drm_of_encoder_active_endpoint_id(struct device_node *node,
-- 
2.7.4

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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux