diff options
author | Stephan Gerhold <stephan@gerhold.net> | 2021-06-18 19:36:09 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-18 13:13:40 -0700 |
commit | 60302ce4ea075369641426ef407c110e36ea8ba1 (patch) | |
tree | f9b5d52e1a12ca617a20e4604467d56a113503ea /drivers/rpmsg | |
parent | 01bf086b7c836bf5ccb6a92bb98b42ebfc841fc7 (diff) | |
download | linux-stable-60302ce4ea075369641426ef407c110e36ea8ba1.tar.gz linux-stable-60302ce4ea075369641426ef407c110e36ea8ba1.tar.bz2 linux-stable-60302ce4ea075369641426ef407c110e36ea8ba1.zip |
rpmsg: core: Add driver_data for rpmsg_device_id
Most device_id structs provide a driver_data field that can be used
by drivers to associate data more easily for a particular device ID.
Add the same for the rpmsg_device_id.
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/rpmsg')
-rw-r--r-- | drivers/rpmsg/rpmsg_core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/rpmsg/rpmsg_core.c b/drivers/rpmsg/rpmsg_core.c index e5daee4f9373..c1404d3dae2c 100644 --- a/drivers/rpmsg/rpmsg_core.c +++ b/drivers/rpmsg/rpmsg_core.c @@ -459,8 +459,10 @@ static int rpmsg_dev_match(struct device *dev, struct device_driver *drv) if (ids) for (i = 0; ids[i].name[0]; i++) - if (rpmsg_id_match(rpdev, &ids[i])) + if (rpmsg_id_match(rpdev, &ids[i])) { + rpdev->id.driver_data = ids[i].driver_data; return 1; + } return of_driver_match_device(dev, drv); } |