From patchwork Tue Apr 15 17:38:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 3998191 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 323789F2CC for ; Wed, 16 Apr 2014 05:52:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6D67F20260 for ; Wed, 16 Apr 2014 05:52:46 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 3052120259 for ; Wed, 16 Apr 2014 05:52:45 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 3CAE8261A84; Wed, 16 Apr 2014 07:52:44 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 366A72616C9; Wed, 16 Apr 2014 07:52:04 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 311F62650DD; Tue, 15 Apr 2014 19:39:20 +0200 (CEST) Received: from mout.web.de (mout.web.de [212.227.17.11]) by alsa0.perex.cz (Postfix) with ESMTP id 3CB02264F02 for ; Tue, 15 Apr 2014 19:39:10 +0200 (CEST) Received: from kongar.lan.local ([77.64.221.251]) by smtp.web.de (mrweb001) with ESMTPSA (Nemesis) id 0LgHau-1XLWsn1N5g-00nkfz; Tue, 15 Apr 2014 19:39:05 +0200 From: Alexander Stein To: Jaroslav Kysela , Takashi Iwai Date: Tue, 15 Apr 2014 19:38:56 +0200 Message-Id: <1397583537-4222-1-git-send-email-alexanders83@web.de> X-Mailer: git-send-email 1.9.2 In-Reply-To: <1397293707-26890-1-git-send-email-alexanders83@web.de> References: <1397293707-26890-1-git-send-email-alexanders83@web.de> X-Provags-ID: V03:K0:L/aZAfwoYy57+RuWi5o93M3nIERUmcbY/ll5elvuCmPCO++V2RF EEyytbIyrXh4IowLQpd7FH4DQYXb+nAP2zhhQbTJ15bSF9VNptJNaZz/A65zZhOHu8IPZRY Jt5dRlo/sXjsx40MkwaaCKw8p1J6J+PdHzzZbRVP7BGbQJQ4EZUoEuEP4HvmO8ui+VOySf5 MgstzayEC0W9gj0tGEtsw== X-Mailman-Approved-At: Wed, 16 Apr 2014 07:52:02 +0200 Cc: Alexander Stein , Nicolas Ferre , alsa-devel@alsa-project.org, Alexandre Belloni Subject: [alsa-devel] [PATCH v2 1/2] ALSA: sound/atmel/ac97c.c: Convert to module_platform_driver X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP This reduces some boilerplate code. Signed-off-by: Alexander Stein Acked-by: Alexandre Belloni Acked-by: Nicolas Ferre --- sound/atmel/ac97c.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c index 05ec049..a04d2317 100644 --- a/sound/atmel/ac97c.c +++ b/sound/atmel/ac97c.c @@ -1198,6 +1198,7 @@ static int atmel_ac97c_remove(struct platform_device *pdev) } static struct platform_driver atmel_ac97c_driver = { + .probe = atmel_ac97c_probe, .remove = atmel_ac97c_remove, .driver = { .name = "atmel_ac97c", @@ -1205,19 +1206,7 @@ static struct platform_driver atmel_ac97c_driver = { .pm = ATMEL_AC97C_PM_OPS, }, }; - -static int __init atmel_ac97c_init(void) -{ - return platform_driver_probe(&atmel_ac97c_driver, - atmel_ac97c_probe); -} -module_init(atmel_ac97c_init); - -static void __exit atmel_ac97c_exit(void) -{ - platform_driver_unregister(&atmel_ac97c_driver); -} -module_exit(atmel_ac97c_exit); +module_platform_driver(atmel_ac97c_driver); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Driver for Atmel AC97 controller");