From patchwork Thu Oct 27 14:15:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Slawomir Stepien X-Patchwork-Id: 9399525 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 044126059C for ; Thu, 27 Oct 2016 14:31:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE3842A228 for ; Thu, 27 Oct 2016 14:31:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D354A2A265; Thu, 27 Oct 2016 14:31:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6FDC32A309 for ; Thu, 27 Oct 2016 14:31:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S942228AbcJ0ObL (ORCPT ); Thu, 27 Oct 2016 10:31:11 -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: Received: from x220.localdomain (unknown [188.121.17.172]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by www.poczta.fm (INTERIA.PL) with ESMTPSA; Thu, 27 Oct 2016 16:15:24 +0200 (CEST) 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-Disposition: inline User-Agent: Mutt/1.7.1 (2016-10-04) X-Interia-Antivirus: OK DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=interia.pl; s=biztos; t=1477577725; bh=jtUJKfSH6Po385rmwRMFeWzqMMbkICnij9k5e4TdifA=; h=X-Interia-R:X-Interia-R-IP:X-Interia-R-Helo:Date:From:To:Cc: Subject:Message-ID:MIME-Version:Content-Type:Content-Disposition: User-Agent:X-Interia-Antivirus; b=I9kMKSnl3l9g5QkLftZwwp6zvJ9w4FchQkBbX/cVW8d7mus2Rgo3ZsS5cIyWAytgG AYs+zuHHZ0eFOEzm+Aiqxut8L7nhgO3/+bTIr9YpwW7iwojoqTPr5JqOf8wbrmsjxd pH02K7ZR9kqku60u/sgx3BLq8ibPuHSMTVZE2S6I= Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 ");