Skip to contentSkip to conversation

of: Empty of_read_number when !OF

PATCH In review Alexander Stein 2 participants 2 messages Apr 3, 2016 – Apr 4, 2016 1 message not in the archive Device tree

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 of: Empty of_read_number when !OF

Introduce empty of_read_number when CONFIG_OF is not defined. This allows us to compile test gpio drivers.

---
Changes in v2:
* rebased to current gpio's for-next branch

 include/linux/of.h | 5 +++++
 1 file changed, 5 insertions(+)
include/linux/of.h +5 -0
index 7fcb681baadf..f0564a2f0a98 100644
@@ -672,6 +672,11 @@ static inline void of_property_clear_flag(struct property *p, unsigned long flag
 {
 }
 
+static inline u64 of_read_number(const __be32 *cell, int size)
+{
+	return 0;
+}
+
 #define of_match_ptr(_ptr)	NULL
 #define of_match_node(_matches, _node)	NULL
 #endif /* CONFIG_OF */
Signature · 6 lines
2.8.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw
In reply to a message not in the archive
Quoted 2 lines · Alexander Stein

Introduce empty of_read_number when CONFIG_OF is not defined. This allows us to compile test gpio drivers.

The only user I see is sodaville. That case should use of_property_read_u32 instead.

Rob

Quoted 28 lines

---
Changes in v2:
* rebased to current gpio's for-next branch

 include/linux/of.h | 5 +++++
 1 file changed, 5 insertions(+)
include/linux/of.h +5 -0
index 7fcb681baadf..f0564a2f0a98 100644
@@ -672,6 +672,11 @@ static inline void of_property_clear_flag(struct property *p, unsigned long flag
 {
 }
 
+static inline u64 of_read_number(const __be32 *cell, int size)
+{
+	return 0;
+}
+
 #define of_match_ptr(_ptr)	NULL
 #define of_match_node(_matches, _node)	NULL
 #endif /* CONFIG_OF */
Signature · 1 line
2.8.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html