@@ -117,6 +117,8 @@ static const struct {
struct qcom_smd_edge {
struct device dev;
+ const char *name;
+
struct device_node *of_node;
unsigned edge_id;
unsigned remote_pid;
@@ -1278,6 +1280,10 @@ static int qcom_smd_parse_edge(struct device *dev,
return -EINVAL;
}
+ ret = of_property_read_string(node, "label", &edge->name);
+ if (ret < 0)
+ edge->name = node->name;
+
irq = irq_of_parse_and_map(node, 0);
if (irq < 0) {
dev_err(dev, "required smd interrupt missing\n");
@@ -1320,7 +1326,7 @@ static ssize_t rpmsg_name_show(struct device *dev,
{
struct qcom_smd_edge *edge = to_smd_edge(dev);
- return sprintf(buf, "%s\n", edge->of_node->name);
+ return sprintf(buf, "%s\n", edge->name);
}
static DEVICE_ATTR_RO(rpmsg_name);
Add support for the "label" property, used to give the edge a name other than the one of the DT node. This allows the implementor to provide consistently named edges when using the rpmsg character device. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> --- drivers/rpmsg/qcom_smd.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html