Skip to content

Commit

Permalink
staging/android: use module_platform_driver
Browse files Browse the repository at this point in the history
as the init and exit functions just do a platform_driver_register and
platform_driver_unregister, and nothing else, so its better to
use the module_platform_driver macro rather replicating its implementation

Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Devendra Naga authored and Greg Kroah-Hartman committed Aug 14, 2012
1 parent 3d4e9e5 commit c21be47
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions drivers/staging/android/timed_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,18 +161,7 @@ static struct platform_driver timed_gpio_driver = {
},
};

static int __init timed_gpio_init(void)
{
return platform_driver_register(&timed_gpio_driver);
}

static void __exit timed_gpio_exit(void)
{
platform_driver_unregister(&timed_gpio_driver);
}

module_init(timed_gpio_init);
module_exit(timed_gpio_exit);
module_platform_driver(timed_gpio_driver);

MODULE_AUTHOR("Mike Lockwood <lockwood@android.com>");
MODULE_DESCRIPTION("timed gpio driver");
Expand Down

0 comments on commit c21be47

Please sign in to comment.