From: Sachin Kamat Date: Mon, 18 Mar 2013 04:26:22 +0000 (-0700) Subject: Input: davinci_keyscan - use module_platform_driver_probe macro X-Git-Tag: Ubuntu-5.2.0-15.16~9578^2~931 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=6b0bc60b8b87be28f00dc71e624bd693d830bf74;p=mirror_ubuntu-eoan-kernel.git Input: davinci_keyscan - use module_platform_driver_probe macro module_platform_driver_probe() simplifies the code by eliminating boilerplate code. Signed-off-by: Sachin Kamat Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/keyboard/davinci_keyscan.c b/drivers/input/keyboard/davinci_keyscan.c index 4e4e453ea15e..829753702b62 100644 --- a/drivers/input/keyboard/davinci_keyscan.c +++ b/drivers/input/keyboard/davinci_keyscan.c @@ -329,17 +329,7 @@ static struct platform_driver davinci_ks_driver = { .remove = davinci_ks_remove, }; -static int __init davinci_ks_init(void) -{ - return platform_driver_probe(&davinci_ks_driver, davinci_ks_probe); -} -module_init(davinci_ks_init); - -static void __exit davinci_ks_exit(void) -{ - platform_driver_unregister(&davinci_ks_driver); -} -module_exit(davinci_ks_exit); +module_platform_driver_probe(davinci_ks_driver, davinci_ks_probe); MODULE_AUTHOR("Miguel Aguilar"); MODULE_DESCRIPTION("Texas Instruments DaVinci Key Scan Driver");