Adds a new attribute to the rpmsg device to expose in sysfs the the removability of an rpmsg device. Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@xxxxxxxxxxx> --- drivers/rpmsg/rpmsg_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/rpmsg/rpmsg_core.c b/drivers/rpmsg/rpmsg_core.c index e5daee4f9373..b2543ef4a92f 100644 --- a/drivers/rpmsg/rpmsg_core.c +++ b/drivers/rpmsg/rpmsg_core.c @@ -413,6 +413,7 @@ rpmsg_show_attr(src, src, "0x%x\n"); rpmsg_show_attr(dst, dst, "0x%x\n"); rpmsg_show_attr(announce, announce ? "true" : "false", "%s\n"); rpmsg_string_attr(driver_override, driver_override); +rpmsg_show_attr(removable, us_removable ? "true" : "false", "%s\n"); static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, char *buf) @@ -435,6 +436,7 @@ static struct attribute *rpmsg_dev_attrs[] = { &dev_attr_src.attr, &dev_attr_announce.attr, &dev_attr_driver_override.attr, + &dev_attr_removable.attr, NULL, }; ATTRIBUTE_GROUPS(rpmsg_dev); -- 2.17.1