From patchwork Mon Aug 6 11:55:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 10519 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 C18BF24027 for ; Mon, 6 Aug 2012 11:57:48 +0000 (UTC) Received: from mail-yw0-f52.google.com (mail-yw0-f52.google.com [209.85.213.52]) by fiordland.canonical.com (Postfix) with ESMTP id 8FEE7A18288 for ; Mon, 6 Aug 2012 11:57:48 +0000 (UTC) Received: by mail-yw0-f52.google.com with SMTP id p61so485685yhp.11 for ; Mon, 06 Aug 2012 04:57:48 -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=KWgSnyYHFkY+wnXI6ffPR6J+Umjq1gryDcZ72LAsd3Q=; b=cs/VeMHzdMLW5HfpeNBJv1sL8dr/6jpd/9GWtIhCyRgaC4X/MPRmO8V/GF3zN5QOAQ kL7iZASJKUJNB/8BOkBOfF6FzlWWoEggbw5Rmfn2vbMDr3/lgpDemy3g1yrK0I8BslK1 EKcpUflvBbZ8XAGXc+Jw6s74kJ0kJhUcY1vCawLo6f+UC4KpKKEvbI9jy1UNEg67LwKa nbADE8KgDIehlGaRDZObIqPrC5eruzn97caiVYJKSGzAePA0VU5flD7P9iHoSYUVubrr TNojKeJogxe13Qmg6UzPmMTWVT7LeEbH1aSQ/vepiOJgNIp56p+ISpHK2kL4/k73E8C2 e1XA== Received: by 10.50.47.161 with SMTP id e1mr5029068ign.11.1344254267983; Mon, 06 Aug 2012 04:57:47 -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.87.40 with SMTP id u8csp436610igz; Mon, 6 Aug 2012 04:57:47 -0700 (PDT) Received: by 10.100.77.2 with SMTP id z2mr2926177ana.8.1344254267146; Mon, 06 Aug 2012 04:57:47 -0700 (PDT) Received: from mail-yw0-f50.google.com (mail-yw0-f50.google.com [209.85.213.50]) by mx.google.com with ESMTPS id j6si8450677yhe.89.2012.08.06.04.57.47 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:57:47 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.213.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.213.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.213.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-yw0-f50.google.com with SMTP id j63so2740978yhj.37 for ; Mon, 06 Aug 2012 04:57:47 -0700 (PDT) Received: by 10.66.88.202 with SMTP id bi10mr17729208pab.10.1344254266567; Mon, 06 Aug 2012 04:57:46 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id sk5sm8844705pbc.7.2012.08.06.04.57.43 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:57:46 -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 07/27] ASoC: wm8991: Use module_i2c_driver Date: Mon, 6 Aug 2012 17:25:40 +0530 Message-Id: <1344254160-6615-8-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1344254160-6615-1-git-send-email-sachin.kamat@linaro.org> References: <1344254160-6615-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQmCKAGXpWGur9VhsD0QHXj4UpLP2eh5HNx6kMdJB8UNSk3zoGpnRKft1QW0GuNjM53HNSP5 module_i2c_driver makes the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat --- sound/soc/codecs/wm8991.c | 18 +----------------- 1 files changed, 1 insertions(+), 17 deletions(-) diff --git a/sound/soc/codecs/wm8991.c b/sound/soc/codecs/wm8991.c index 9ac31ba..b9dbfeb 100644 --- a/sound/soc/codecs/wm8991.c +++ b/sound/soc/codecs/wm8991.c @@ -1400,23 +1400,7 @@ static struct i2c_driver wm8991_i2c_driver = { .id_table = wm8991_i2c_id, }; -static int __init wm8991_modinit(void) -{ - int ret; - ret = i2c_add_driver(&wm8991_i2c_driver); - if (ret != 0) { - printk(KERN_ERR "Failed to register WM8991 I2C driver: %d\n", - ret); - } - return 0; -} -module_init(wm8991_modinit); - -static void __exit wm8991_exit(void) -{ - i2c_del_driver(&wm8991_i2c_driver); -} -module_exit(wm8991_exit); +module_i2c_driver(wm8991_i2c_driver); MODULE_DESCRIPTION("ASoC WM8991 driver"); MODULE_AUTHOR("Graeme Gregory");