From patchwork Thu Dec 6 18:28:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 10716571 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B584315A6 for ; Thu, 6 Dec 2018 18:29:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A5E3E2F0CD for ; Thu, 6 Dec 2018 18:29:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 999CD2F0D1; Thu, 6 Dec 2018 18:29:40 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 378992F0CD for ; Thu, 6 Dec 2018 18:29:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=hvkNRUGOFSZUst/kZOo3nkqEhNR4GFD0pKNM/Qb79JU=; b=RF1y+A5gg0oLbxGHit/IteR0uf xVx7OpUcbCxhIxLcrNySBoyeN0rShDRBx/50hLzqQ6fJRyScJDU/rN0NshA7cTRAzFeONzgSUFT1d L2RDD9498To4+OhSS7K4smzl9Y7zItojGIDVcO6fgQzAsNePza2Ryhlj4DhC830OC2fIUTEKKlkgd /YWDJ33Cxz18QwYPfvVl2RGZxlRThVocY7EMm4yKBslJ5V09FSgcL9T6TzpGI7gK3hgDAc5p4QLjx 2ZfQBiAUp0Weg1GMTdLiDLzCifSpbKg0H7QESxGcL9RtFtWMwwE0fRUAbdZp8NvZHPOWRAi0B/QUr nFHVD4Pw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUyOz-0004sD-15; Thu, 06 Dec 2018 18:29:33 +0000 Received: from mout.kundenserver.de ([212.227.126.130]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUyOu-0004om-Pl for linux-arm-kernel@lists.infradead.org; Thu, 06 Dec 2018 18:29:30 +0000 Received: from localhost.localdomain ([37.4.249.153]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1M6pck-1gYpkB0GvG-008N2O; Thu, 06 Dec 2018 19:29:09 +0100 From: Stefan Wahren To: Greg Kroah-Hartman Subject: [PATCH 07/10] staging: bcm2835-audio: use module_platform_driver() macro Date: Thu, 6 Dec 2018 19:28:57 +0100 Message-Id: <1544120940-13716-8-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544120940-13716-1-git-send-email-stefan.wahren@i2se.com> References: <1544120940-13716-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:OWnA9d9J+HDWzhJmyqCNKOPwrDFw9AW2VQy+1nSI0tNNUA2UcNS 9KlkwKvhH1KAymEjrpaCgHq1SNgU5FVQts4l3Zni+wNnfaBIn9WqOvehk0HY5GGmXhkWIUd TJJeabQkQrY0TsnfiWthnP+z88FoTwPe3oyNZqneWQ5O57LtWIH/EvrUwN5/VALM0JzMLFR hjeynlZqWLkOlV4aF/JeQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:NoUZOmwLpsU=:XLFea0/HG80mPYp+73C9En vz2m3l/YwGgNLSpuZrtMLqtOHPHpc/ojHI0OR/AmyBKJn3EEm06VpYqGACcZ85BDz0Fuq47Xj 7KvLnKueJXcaS8BhcRJvep0aoKwkf4K4BL1BXrkr08NdSrMSKSX440ib79ieQ+DrrCVnG9p1V 2v440Arwst3ePPNtHtaESTlWANNeRL0/qlFA4stIMnmbLiSNnoucQjgzA7BRb6ZLfrEnbxuJj yxOJOb8h6exByWv9R/j4EdDIyEMyYN5udF5bzwo26WzFc3Is2MlEnjy6iehPWFhC8vfjbPLPb VP23F4hujqB/1NoH7fyxqcuZqXh4HoqGFXDEdpxjxO12UiRxRZB9AerBEDqGH7e2ElMSF8bSd 12rU3oA9voB5yV3ESPfrn2DvtGpggABx9sZGHd6+Md8I9rJLHnmu80ujbPHElqINjBbam8r9X veFLqXWwvd5NJm6LuKbwY+6NHpVz3AgW9G2MssUtN52sdUCbo6dzHnRwVYImTAoc8FThgmZwN s7jl4ddRMFrFK7yTMPU28XkTYtbV0gFWMKS70w1rq+mjLRnbnQsGCy6l6OB6zUDQOPZYChNod N9ETyWha4cZoSDyIpM4mFAQ/2spl2Um+BJoR3x9lyD/z9v4YiDhBpe/OoPO2EPd1/QkxXEwjB /FD1YZ729qKzBjEIog8iFMgOfHy0vKvvQklfgzXDdXJI8gNiHh1Jv5jf5HWewjou06iUE0FCc nYfukQCSVWJEOv6ygo9WttlIhEgEZwF8N/dyXYrz+qbxq+G916Vda2ks4Fg= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181206_102929_161920_5031948F X-CRM114-Status: GOOD ( 11.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, Stefan Wahren , Takashi Iwai , Eric Anholt , linux-arm-kernel@lists.infradead.org, Dave Stevenson , Nicolas Saenz Julienne MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP There is not much value behind this boilerplate, so use module_platform_driver() instead. Signed-off-by: Stefan Wahren Reviewed-by: Nicolas Saenz Julienne --- .../staging/vc04_services/bcm2835-audio/bcm2835.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c index e14b7c5..86b9210 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c @@ -354,25 +354,7 @@ static struct platform_driver bcm2835_alsa_driver = { .of_match_table = snd_bcm2835_of_match_table, }, }; - -static int bcm2835_alsa_device_init(void) -{ - int retval; - - retval = platform_driver_register(&bcm2835_alsa_driver); - if (retval) - pr_err("Error registering bcm2835_audio driver %d .\n", retval); - - return retval; -} - -static void bcm2835_alsa_device_exit(void) -{ - platform_driver_unregister(&bcm2835_alsa_driver); -} - -late_initcall(bcm2835_alsa_device_init); -module_exit(bcm2835_alsa_device_exit); +module_platform_driver(bcm2835_alsa_driver); MODULE_AUTHOR("Dom Cobley"); MODULE_DESCRIPTION("Alsa driver for BCM2835 chip");