}
EXPORT_SYMBOL_GPL(of_machine_read_compatible);
+/**
+ * of_machine_read_model - Get the model string of this machine
+ * @model: address at which the address of the model string will be stored
+ *
+ * Returns:
+ * 0 on success, negative error number on failure.
+ */
+int of_machine_read_model(const char **model)
+{
+ return of_property_read_string(of_root, "model", model);
+}
+EXPORT_SYMBOL_GPL(of_machine_read_model);
+
/**
* of_machine_device_match - Test root of device tree against a of_device_id array
* @matches: NULL terminated array of of_device_id match structures to search in
}
int of_machine_read_compatible(const char **compatible, unsigned int index);
+int of_machine_read_model(const char **model);
extern int of_add_property(struct device_node *np, struct property *prop);
extern int of_remove_property(struct device_node *np, struct property *prop);
return -ENOSYS;
}
+static inline int of_machine_read_model(const char **model)
+{
+ return -ENOSYS;
+}
+
static inline int of_add_property(struct device_node *np, struct property *prop)
{
return 0;