diff options
author | Bjorn Andersson <bjorn.andersson@linaro.org> | 2016-10-07 21:23:12 -0700 |
---|---|---|
committer | Leonard Crestez <leonard.crestez@nxp.com> | 2018-08-24 12:41:33 +0300 |
commit | b310166552f36c72301e30247d7ac97de5315b05 (patch) | |
tree | dfca7f5cea6d3aa884e9ced345fc576272c71f34 /drivers | |
parent | 4364d0226f59c647d0ad45a591ab016cba2cc50b (diff) |
rpmsg: Introduce a driver override mechanism
Similar to other subsystems it's useful to provide a mechanism to force
a specific driver match on a device, so introduce this.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/rpmsg/rpmsg_core.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/rpmsg/rpmsg_core.c b/drivers/rpmsg/rpmsg_core.c index e0a629eaceab..028190080eb3 100644 --- a/drivers/rpmsg/rpmsg_core.c +++ b/drivers/rpmsg/rpmsg_core.c @@ -315,6 +315,9 @@ static int rpmsg_dev_match(struct device *dev, struct device_driver *drv) const struct rpmsg_device_id *ids = rpdrv->id_table; unsigned int i; + if (rpdev->driver_override) + return !strcmp(rpdev->driver_override, drv->name); + if (ids) for (i = 0; ids[i].name[0]; i++) if (rpmsg_id_match(rpdev, &ids[i])) |