From patchwork Mon Jun 11 19:35:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 10458705 X-Patchwork-Delegate: kvalo@adurom.com 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 B41DC601A0 for ; Mon, 11 Jun 2018 19:36:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A4D482859A for ; Mon, 11 Jun 2018 19:36:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 99260285A0; Mon, 11 Jun 2018 19:36:04 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, TVD_SPACE_RATIO autolearn=unavailable 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 4CE392859A for ; Mon, 11 Jun 2018 19:36:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933357AbeFKTfw (ORCPT ); Mon, 11 Jun 2018 15:35:52 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:38196 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932139AbeFKTfu (ORCPT ); Mon, 11 Jun 2018 15:35:50 -0400 Received: by mail-pf0-f196.google.com with SMTP id b74-v6so10775496pfl.5 for ; Mon, 11 Jun 2018 12:35:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=z82AsbSiTvOBPXaS1jqrM3cx1/5k3cw9Ov4Z74GZlt8=; b=BfJAIUoXAAkckAru1aHcNp43oEEeijV0PPqrr7smJyMNTMl+Sa7c1Ym7PNtVdhWX9b rs+jFvly7n3FGxbjTfqE1PDMJu+uO9UFSzR1OL26sig67DWZZPp10gfA0R4cGnNBgB+q cKNwcc6WrTkUMZeXPABhep6+sZauOpmHkq+uI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=z82AsbSiTvOBPXaS1jqrM3cx1/5k3cw9Ov4Z74GZlt8=; b=EMQkcPwqzl9KnSbUyE/59/5SXQPgN4QiQgfqfXP9PaUYYCH18Eu2nhZgzUSIln9XLD 2z/LTRaSeLr6kzN1c9Usuls5RgWFVMkaq2F5+ki/EFrD14WfCm3nY+bUnimKHfEx6cKc pwqmOEwV615lNtzkB/4QdG8QPdshvy6v9jeaTz5tmTYi+UOWpfTnTmOkOUQzVBniGYUU jGVJjEU3rBNIIU0ew+KRVMiU8se0vnTCNjNEDSJHy93P/Ow37JYW2Mgxd0rYgeVum99d 3tdVgtRj+cxviSargwBViFo/QOMLxNxbwATJDztilpo/BElESpT7Rsyx6TAPLJDABDV8 IJdA== X-Gm-Message-State: APt69E0A9VVqFuN42rjkC+disM+TEO4yo9d0aIF8W0C97syVRIa07T2G WDxdEBbum4wklXIenPX+lsyE2Q== X-Google-Smtp-Source: ADUXVKLWm1hd62nr5nF/HNxaGMuvipr7VcMS8FeZFOsaODQSsE+KVYS0wZWbkOezkQsEGJfw1t5lUQ== X-Received: by 2002:a62:4e07:: with SMTP id c7-v6mr484169pfb.149.1528745750389; Mon, 11 Jun 2018 12:35:50 -0700 (PDT) Received: from ban.mtv.corp.google.com ([2620:0:1000:1501:bc2f:3082:9938:5d41]) by smtp.gmail.com with ESMTPSA id y2-v6sm26734221pfk.82.2018.06.11.12.35.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Jun 2018 12:35:48 -0700 (PDT) From: Brian Norris To: Kalle Valo Cc: ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, Govind Singh , , Brian Norris Subject: [PATCH] ath10k: snoc: use module_platform_driver() macro Date: Mon, 11 Jun 2018 12:35:40 -0700 Message-Id: <20180611193540.190255-1-briannorris@chromium.org> X-Mailer: git-send-email 2.18.0.rc1.242.g61856ae69a-goog Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ath10k_snoc_init()/ath10k_snoc_exit() don't add much value; module_platform_driver() can remove the boilerplate. Signed-off-by: Brian Norris --- drivers/net/wireless/ath/ath10k/snoc.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c index a3a7042fe13a..ee74e0060504 100644 --- a/drivers/net/wireless/ath/ath10k/snoc.c +++ b/drivers/net/wireless/ath/ath10k/snoc.c @@ -1388,25 +1388,7 @@ static struct platform_driver ath10k_snoc_driver = { .of_match_table = ath10k_snoc_dt_match, }, }; - -static int __init ath10k_snoc_init(void) -{ - int ret; - - ret = platform_driver_register(&ath10k_snoc_driver); - if (ret) - pr_err("failed to register ath10k snoc driver: %d\n", - ret); - - return ret; -} -module_init(ath10k_snoc_init); - -static void __exit ath10k_snoc_exit(void) -{ - platform_driver_unregister(&ath10k_snoc_driver); -} -module_exit(ath10k_snoc_exit); +module_platform_driver(ath10k_snoc_driver); MODULE_AUTHOR("Qualcomm"); MODULE_LICENSE("Dual BSD/GPL");