drivercore: Add helper macro for platform_driver boilerplate
For simple modules that contain a single platform_driver without any additional setup code then ends up being a block of duplicated boilerplate. This patch adds a new macro, module_platform_driver(), which replaces the module_init()/module_exit() registrations with template functions. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NGreg Kroah-Hartman <gregkh@suse.de> Reviewed-by: NMagnus Damm <magnus.damm@gmail.com> Reviewed-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Reviewed-by: NStephen Boyd <sboyd@codeaurora.org>
Showing
想要评论请 注册 或 登录