]> git.baikalelectronics.ru Git - kernel.git/commit
staging: mt7621-gpio: use module_platform_driver() instead subsys initcall
authorSergio Paracuellos <sergio.paracuellos@gmail.com>
Fri, 25 May 2018 16:54:48 +0000 (18:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Jun 2018 09:17:05 +0000 (11:17 +0200)
commit9a6daeb2418e09e85ead881bc7b49d7ec6e59972
tree828bde7828a85def8b4522628f419e2c7b18fbe4
parentec3c4f7fa0cccc561650f4fdd177de94ad7050f3
staging: mt7621-gpio: use module_platform_driver() instead subsys initcall

The driver's init function don't do anything besides registering the platform
driver, and the exit function which is not included in the driver should only
do driver unregister. Because of this module_platform_driver() macro could
just be used instead of having separate functions.

Currently the macro is not being used because the driver is initialized at
subsys init call level but this isn't necessary since platform devices are
defined in the DT as dependencies so there's no need for init calls order.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/mt7621-gpio/gpio-mt7621.c