If the OF_I2C configure option is not enabled or not available like on
SPARC, the of_find_i2c_device_by_node and of_find_i2c_adapter_by_node
functions are not declared and can thus lead to compilation errors in
drivers using those.

Signed-off-by: Maxime Ripard <[email protected]>
Reported-by: [email protected]
---
 include/linux/of_i2c.h |   13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/include/linux/of_i2c.h b/include/linux/of_i2c.h
index 1cb775f..f1ec7f7 100644
--- a/include/linux/of_i2c.h
+++ b/include/linux/of_i2c.h
@@ -29,6 +29,19 @@ static inline void of_i2c_register_devices(struct 
i2c_adapter *adap)
 {
        return;
 }
+
+static inline
+struct i2c_client *of_find_i2c_device_by_node(struct device_node *node)
+{
+       return NULL;
+}
+
+static inline
+struct i2c_adapter *of_find_i2c_adapter_by_node(struct device_node *node)
+{
+       return NULL;
+}
+
 #endif /* CONFIG_OF_I2C */
 
 #endif /* __LINUX_OF_I2C_H */
-- 
1.7.9.5

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

Reply via email to