diff options
author | Stephen Boyd <sboyd@codeaurora.org> | 2015-09-10 15:06:20 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-09-20 19:32:02 -0700 |
commit | ff6f46483f0e14b829cd5a71bafcbb1c136a84b6 (patch) | |
tree | 6a0b127bd5637ce468571a6da2d9bcdb89732b60 /drivers/spmi/spmi.c | |
parent | cf094ebe4d8b9efbc83c8f13b1b8453a573cbb66 (diff) | |
download | linux-ff6f46483f0e14b829cd5a71bafcbb1c136a84b6.tar.bz2 |
spmi: Auto-populate driver.owner in spmi_driver_register()
Populate the owner field of the spmi driver when
spmi_driver_register() is called in a similar fashion to how
other *_driver_register() functions do it. This saves driver
writers from having to do this themselves.
Cc: Andy Gross <agross@codeaurora.org>
Cc: Gilad Avidov <gavidov@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/spmi/spmi.c')
-rw-r--r-- | drivers/spmi/spmi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/spmi/spmi.c b/drivers/spmi/spmi.c index 11467e17bdd8..6b3da1bb0d63 100644 --- a/drivers/spmi/spmi.c +++ b/drivers/spmi/spmi.c @@ -560,12 +560,13 @@ EXPORT_SYMBOL_GPL(spmi_controller_remove); * This API will register the client driver with the SPMI framework. * It is typically called from the driver's module-init function. */ -int spmi_driver_register(struct spmi_driver *sdrv) +int __spmi_driver_register(struct spmi_driver *sdrv, struct module *owner) { sdrv->driver.bus = &spmi_bus_type; + sdrv->driver.owner = owner; return driver_register(&sdrv->driver); } -EXPORT_SYMBOL_GPL(spmi_driver_register); +EXPORT_SYMBOL_GPL(__spmi_driver_register); static void __exit spmi_exit(void) { |