mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
cf094ebe4d
commit
ff6f46483f
2 changed files with 6 additions and 3 deletions
|
@ -153,7 +153,9 @@ static inline struct spmi_driver *to_spmi_driver(struct device_driver *d)
|
|||
return container_of(d, struct spmi_driver, driver);
|
||||
}
|
||||
|
||||
int spmi_driver_register(struct spmi_driver *sdrv);
|
||||
#define spmi_driver_register(sdrv) \
|
||||
__spmi_driver_register(sdrv, THIS_MODULE)
|
||||
int __spmi_driver_register(struct spmi_driver *sdrv, struct module *owner);
|
||||
|
||||
/**
|
||||
* spmi_driver_unregister() - unregister an SPMI client driver
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue