From patchwork Mon Aug 27 11:30:28 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 10973 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 68A8623E56 for ; Mon, 27 Aug 2012 11:32:57 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 04A69A1805A for ; Mon, 27 Aug 2012 11:32:30 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id j25so5332070iaf.11 for ; Mon, 27 Aug 2012 04:32:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=6HkJEaj9poYKaxgpfF6U7qSVB27j4yodvPj7BxTlLIc=; b=kwLnbBBLAvb9GLkQBGkuZhO8lQq5A91OR76yHMoo9QMGXzwzPsWXQMmZOqigx0UP3C P5JF7evPWsofDlaloBDRUPuCMgklO41NAntR3imSwskfo1+60sqxvbCf6DCz6Gm8K4oy 7mr0smcMf8fqKE7okAkv9gD1/tgOpWzK/pcl/IJQ2owmI1+YvDMIBvYsAH4vj4b6w5Vk pdebAuEof6j6H3F5Nfu7shdbn/41qA8Ngrs87GJM23or3AA+0AgWS1BB/m3C4UHKJz90 pd66FeAZcDhRpjS4cgpAo9zn8txZJnb5mPYrJcDE4bvZne75YQJfQ5NUgcO3U7osqnbQ +M6A== Received: by 10.42.84.69 with SMTP id k5mr10780279icl.5.1346067176809; Mon, 27 Aug 2012 04:32:56 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp436067igc; Mon, 27 Aug 2012 04:32:56 -0700 (PDT) Received: by 10.68.197.70 with SMTP id is6mr33515197pbc.64.1346067176249; Mon, 27 Aug 2012 04:32:56 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id vn9si19583161pbc.317.2012.08.27.04.32.56 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 27 Aug 2012 04:32:56 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by pbcmd12 with SMTP id md12so7892480pbc.37 for ; Mon, 27 Aug 2012 04:32:56 -0700 (PDT) Received: by 10.66.83.129 with SMTP id q1mr29675035pay.4.1346067175904; Mon, 27 Aug 2012 04:32:55 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id po4sm11461764pbb.13.2012.08.27.04.32.53 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 27 Aug 2012 04:32:55 -0700 (PDT) From: Sachin Kamat To: alsa-devel@alsa-project.org Cc: broonie@opensource.wolfsonmicro.com, tiwai@suse.de, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 3/3] ASoC: ad1836: Use module_spi_driver Date: Mon, 27 Aug 2012 17:00:28 +0530 Message-Id: <1346067028-9534-3-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1346067028-9534-1-git-send-email-sachin.kamat@linaro.org> References: <1346067028-9534-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQmEaDGGO7rqDvmZ8zfcc7iyHN0MpELb6hGMQcpKkqiOC9L1Q3hdbInXZjTsutMx6/e6EKdI module_spi_driver makes the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat --- sound/soc/codecs/ad1836.c | 12 +----------- 1 files changed, 1 insertions(+), 11 deletions(-) diff --git a/sound/soc/codecs/ad1836.c b/sound/soc/codecs/ad1836.c index c67b50d..ae1eb51 100644 --- a/sound/soc/codecs/ad1836.c +++ b/sound/soc/codecs/ad1836.c @@ -379,17 +379,7 @@ static struct spi_driver ad1836_spi_driver = { .id_table = ad1836_ids, }; -static int __init ad1836_init(void) -{ - return spi_register_driver(&ad1836_spi_driver); -} -module_init(ad1836_init); - -static void __exit ad1836_exit(void) -{ - spi_unregister_driver(&ad1836_spi_driver); -} -module_exit(ad1836_exit); +module_spi_driver(ad1836_spi_driver); MODULE_DESCRIPTION("ASoC ad1836 driver"); MODULE_AUTHOR("Barry Song <21cnbao@gmail.com>");