rpmsg: Make modalias work for DeviceTree based devices
PATCH 1/1 rpmsg: Make modalias work for DeviceTree based devices
When rpmsg devices are expected to be matched based on their compatible the modalias should reflect this, so that module autoloading has a chance to match and load the appropriate module.
Reported-by Rob Clark <[email protected]>
Signed-off-by Bjorn Andersson <[email protected]>
--- drivers/rpmsg/rpmsg_core.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/rpmsg/rpmsg_core.c +5 -0
@@ -343,6 +343,11 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, char *buf) { struct rpmsg_device *rpdev = to_rpmsg_device(dev); +ssize_t len; + + len =of_device_modalias (dev, buf,PAGE_SIZE ); +if (len != -ENODEV ) +return len;return sprintf (buf,RPMSG_DEVICE_MODALIAS_FMT "\n" , rpdev->id.name); }
Signature · 1 line
2.12.0