From patchwork Sun Aug 21 15:28:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9292225 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 5FE5E600CB for ; Sun, 21 Aug 2016 15:29:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4F43D289BE for ; Sun, 21 Aug 2016 15:29:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 405D8289CB; Sun, 21 Aug 2016 15:29:34 +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_ADSP_CUSTOM_MED, 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 A5451289BE for ; Sun, 21 Aug 2016 15:29:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753176AbcHUP3d (ORCPT ); Sun, 21 Aug 2016 11:29:33 -0400 Received: from mail-pa0-f65.google.com ([209.85.220.65]:33986 "EHLO mail-pa0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752877AbcHUP3c (ORCPT ); Sun, 21 Aug 2016 11:29:32 -0400 Received: by mail-pa0-f65.google.com with SMTP id hh10so6548163pac.1 for ; Sun, 21 Aug 2016 08:29:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gqpI6D5Uxs1XJqy2wstoj0nXHzbwi1IYG3sTvgBeW4Q=; b=lfWxa8CLqyZyURMdz78UexTwRF4Wo9ww6quR+1MbgK+6aTrKfZPGwPjW1fGmenr1O3 UEHwrhdniUnYJ0UhABv5J05UPzxwCk0VWXqSWmuJN2m4YdljafDw0BPPBHUEhSQm89xW gYtPNMmmhloyAb6WCtLrbiDMfcpYhtBg6IYN0nhDy6yqbItBfAXy/yR7japxelp+Vo31 B9z1MTBy+70scZ9MB1rKSBgkpnlvNgYuxedwgBZoLHDQRYBMFpVg6UW5M4DglhQAr8dZ 5j620NyyPQbDba9rJ6FUbZC/ubfpGjwCVB2dJJdJIxsPhJUaxza8gmKnjliMjBxnBgET OAOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gqpI6D5Uxs1XJqy2wstoj0nXHzbwi1IYG3sTvgBeW4Q=; b=I4bqexaXPqLorHNkXznowoUNutP9lVkNBsRz8xXViF/YCsPnD7zOzCuHfmeqvRvHDG 6bPnskoqPAlY8TAoUsR047LftGP9mlUjX2p7ODUDShq73F5nZRYh4M244hjFoptRFxw5 tYyXhrF4ceQdDSvb6x2TCSN8k2V0z/8LAP9uKLoChUY//gimdgRj+PjFEvn94kR3gb2A 6W0ZU1qZ9VkhVTHGlTyIvW7FJ3bg2qPNFQTyyuf17yK9otDm1NY6c+Ut5Fxim+JtsTqk jBlJmhHoce12LhFedl9zclIy+QW91YHAbxTOTHpsDZoEU6zxU28Onesl3N/wcd8ixmUX 4IUw== X-Gm-Message-State: AEkoous1nGgxiwCJ7bZg8hEcvEnL4NWYEqzs14urbvK4DDDRU8mwh0g4xnCPOnm9FmIpWA== X-Received: by 10.66.119.11 with SMTP id kq11mr33448520pab.14.1471793340383; Sun, 21 Aug 2016 08:29:00 -0700 (PDT) Received: from localhost.localdomain.localdomain (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id d185sm20750010pfd.80.2016.08.21.08.28.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Aug 2016 08:28:59 -0700 (PDT) From: Wei Yongjun To: Srinivas Pandruvada , Jiri Kosina , Benjamin Tissoires Cc: Wei Yongjun , linux-input@vger.kernel.org Subject: [PATCH -next] HID: intel-ish-hid: use module_pci_driver to simplify the code Date: Sun, 21 Aug 2016 15:28:36 +0000 Message-Id: <1471793316-23880-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 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 From: Wei Yongjun Use the module_pci_driver() macro to make the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Wei Yongjun Acked-by: Srinivas Pandruvada --- drivers/hid/intel-ish-hid/ipc/pci-ish.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/hid/intel-ish-hid/ipc/pci-ish.c b/drivers/hid/intel-ish-hid/ipc/pci-ish.c index b14d6f4..42f0bee 100644 --- a/drivers/hid/intel-ish-hid/ipc/pci-ish.c +++ b/drivers/hid/intel-ish-hid/ipc/pci-ish.c @@ -311,18 +311,7 @@ static struct pci_driver ish_driver = { .driver.pm = ISHTP_ISH_PM_OPS, }; -static int __init ish_driver_init(void) -{ - return pci_register_driver(&ish_driver); -} - -static void __exit ish_driver_exit(void) -{ - pci_unregister_driver(&ish_driver); -} - -module_init(ish_driver_init); -module_exit(ish_driver_exit); +module_pci_driver(ish_driver); /* Original author */ MODULE_AUTHOR("Daniel Drubin ");