Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S942957AbcJ0ObN (ORCPT ); Thu, 27 Oct 2016 10:31:13 -0400 Received: from smtpo.poczta.interia.pl ([217.74.65.206]:48998 "EHLO smtpo.poczta.interia.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936146AbcJ0ObJ (ORCPT ); Thu, 27 Oct 2016 10:31:09 -0400 X-Greylist: delayed 933 seconds by postgrey-1.27 at vger.kernel.org; Thu, 27 Oct 2016 10:31:08 EDT X-Interia-R: Interia X-Interia-R-IP: 188.121.17.172 X-Interia-R-Helo: Date: Thu, 27 Oct 2016 16:15:54 +0200 From: Slawomir Stepien To: dmitry.torokhov@gmail.com Cc: ldewangan@nvidia.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] Input: gpio-keys - use module_platform_driver macro Message-ID: <20161027141554.GA31977@x220.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.7.1 (2016-10-04) X-Interia-Antivirus: OK Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1017 Lines: 35 The gpio_keys_init() and gpio_keys_exit() are not doing anything more then just register and unregister. Replace these functions with module_platform_driver. Signed-off-by: Slawomir Stepien --- drivers/input/keyboard/gpio_keys.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index 2909365..e54b586 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c @@ -877,18 +877,7 @@ static struct platform_driver gpio_keys_device_driver = { } }; -static int __init gpio_keys_init(void) -{ - return platform_driver_register(&gpio_keys_device_driver); -} - -static void __exit gpio_keys_exit(void) -{ - platform_driver_unregister(&gpio_keys_device_driver); -} - -late_initcall(gpio_keys_init); -module_exit(gpio_keys_exit); +module_platform_driver(gpio_keys_device_driver); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Phil Blundell "); -- 2.10.0