From patchwork Mon Aug 27 11:30:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 10972 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 7A03523E56 for ; Mon, 27 Aug 2012 11:32:54 +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 1E7FFA1805A for ; Mon, 27 Aug 2012 11:32:28 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id j25so5332070iaf.11 for ; Mon, 27 Aug 2012 04:32:54 -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=LcddtRYcsfwZK10cYqdZihcHZyzfhB+WMIRGbRUZCVQ=; b=Po+nJScSvkYPvHx3TS2mbIuySV8iQhky6W6DYPQUwuyAZynTkQuiXPwc7hyLdZNL4I 5H5thwyVZyxYnZtx7ObB1ZCmGSL7dmlr8EMqtHcSvXk1loxhE5OaFmKnO7sqPFh5j9S/ eoYERZICyMxgHamEDvShwl33uh6IeLpT0RlJiU5AyRe7R611p6By3IdiJw3O501Mc1pB tfgn8k0yHl6R3RWsHTLP9Uxx4WbyLYw8KxMCJcC2wJkUWtKQCI3x6wYHvKTy4jcAeYiL NdnPH1h4Uce4TsztGP59UKKJaZL8TJHKDWx5QMkQWaND1Xf4nSY0zH+b5m7Rmm4YjInb p7qQ== Received: by 10.50.207.106 with SMTP id lv10mr9880839igc.0.1346067173953; Mon, 27 Aug 2012 04:32:53 -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 ex8csp436065igc; Mon, 27 Aug 2012 04:32:53 -0700 (PDT) Received: by 10.66.88.40 with SMTP id bd8mr29533061pab.36.1346067173271; Mon, 27 Aug 2012 04:32:53 -0700 (PDT) Received: from mail-pz0-f50.google.com (mail-pz0-f50.google.com [209.85.210.50]) by mx.google.com with ESMTPS id pb4si31738778pbc.60.2012.08.27.04.32.53 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 27 Aug 2012 04:32:53 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.210.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.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 mail-pz0-f50.google.com with SMTP id e7so2759293dad.37 for ; Mon, 27 Aug 2012 04:32:53 -0700 (PDT) Received: by 10.68.218.163 with SMTP id ph3mr34209505pbc.58.1346067173042; Mon, 27 Aug 2012 04:32:53 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id po4sm11461764pbb.13.2012.08.27.04.32.50 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 27 Aug 2012 04:32:52 -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 2/3] ASoC: wm8770: Use module_spi_driver Date: Mon, 27 Aug 2012 17:00:27 +0530 Message-Id: <1346067028-9534-2-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: ALoCoQnjmOmJ01x8QekCbsxmvCkz/Ft+dnHk8HUjrzVo56I/Fzs9Z7od83CgDbr2aVsNCvocmhf6 module_spi_driver makes the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat --- sound/soc/codecs/wm8770.c | 19 +------------------ 1 files changed, 1 insertions(+), 18 deletions(-) diff --git a/sound/soc/codecs/wm8770.c b/sound/soc/codecs/wm8770.c index a5127b4..c7c0034 100644 --- a/sound/soc/codecs/wm8770.c +++ b/sound/soc/codecs/wm8770.c @@ -724,24 +724,7 @@ static struct spi_driver wm8770_spi_driver = { .remove = __devexit_p(wm8770_spi_remove) }; -static int __init wm8770_modinit(void) -{ - int ret = 0; - - ret = spi_register_driver(&wm8770_spi_driver); - if (ret) { - printk(KERN_ERR "Failed to register wm8770 SPI driver: %d\n", - ret); - } - return ret; -} -module_init(wm8770_modinit); - -static void __exit wm8770_exit(void) -{ - spi_unregister_driver(&wm8770_spi_driver); -} -module_exit(wm8770_exit); +module_spi_driver(wm8770_spi_driver); MODULE_DESCRIPTION("ASoC WM8770 driver"); MODULE_AUTHOR("Dimitris Papastamos ");