aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/spmi.h
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2015-09-10 15:06:20 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-09-20 19:32:02 -0700
commitff6f46483f0e14b829cd5a71bafcbb1c136a84b6 (patch)
tree6a0b127bd5637ce468571a6da2d9bcdb89732b60 /include/linux/spmi.h
parentmei: me: fix d0i3 register offset in tracing (diff)
downloadlinux-dev-ff6f46483f0e14b829cd5a71bafcbb1c136a84b6.tar.xz
linux-dev-ff6f46483f0e14b829cd5a71bafcbb1c136a84b6.zip
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 'include/linux/spmi.h')
-rw-r--r--include/linux/spmi.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/spmi.h b/include/linux/spmi.h
index f84212cd3b7d..1396a255d2a2 100644
--- a/include/linux/spmi.h
+++ b/include/linux/spmi.h
@@ -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