diff options
author | Andrew F. Davis <afd@ti.com> | 2016-05-05 00:01:36 +0200 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2016-05-06 20:08:58 +0200 |
commit | bc3c57c13256c748a4e71d2ea7481d0c953e88e1 (patch) | |
tree | 8e842420e522430a890b741e294d381698cccf6a /drivers/rpmsg | |
parent | Linux 4.6-rc2 (diff) | |
download | linux-bc3c57c13256c748a4e71d2ea7481d0c953e88e1.tar.xz linux-bc3c57c13256c748a4e71d2ea7481d0c953e88e1.zip |
rpmsg: add THIS_MODULE to rpmsg_driver in rpmsg core
Add register_rpmsg_driver helper macro that adds THIS_MODULE to
rpmsg_driver for the registering driver. We rename and modify
the existing register_rpmsg_driver to enable this.
Signed-off-by: Andrew F. Davis <afd@ti.com>
Acked-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/rpmsg')
-rw-r--r-- | drivers/rpmsg/virtio_rpmsg_bus.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c index 1fcd27c1f183..fe03b2aef450 100644 --- a/drivers/rpmsg/virtio_rpmsg_bus.c +++ b/drivers/rpmsg/virtio_rpmsg_bus.c @@ -436,17 +436,19 @@ static struct bus_type rpmsg_bus = { }; /** - * register_rpmsg_driver() - register an rpmsg driver with the rpmsg bus + * __register_rpmsg_driver() - register an rpmsg driver with the rpmsg bus * @rpdrv: pointer to a struct rpmsg_driver + * @owner: owning module/driver * * Returns 0 on success, and an appropriate error value on failure. */ -int register_rpmsg_driver(struct rpmsg_driver *rpdrv) +int __register_rpmsg_driver(struct rpmsg_driver *rpdrv, struct module *owner) { rpdrv->drv.bus = &rpmsg_bus; + rpdrv->drv.owner = owner; return driver_register(&rpdrv->drv); } -EXPORT_SYMBOL(register_rpmsg_driver); +EXPORT_SYMBOL(__register_rpmsg_driver); /** * unregister_rpmsg_driver() - unregister an rpmsg driver from the rpmsg bus |