From patchwork Mon Aug 6 11:55:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 10531 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 6FFCA24027 for ; Mon, 6 Aug 2012 11:58:25 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id 40658A18D3D for ; Mon, 6 Aug 2012 11:58:25 +0000 (UTC) Received: by mail-gg0-f180.google.com with SMTP id f1so2364996ggn.11 for ; Mon, 06 Aug 2012 04:58:25 -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=hMKAi4EAVXsIORrv6yoQiweZDxhFjF1WMIXZsahrnD4=; b=G74CtfUZEfjBEp1tKcdWKtJ7DL0966V+ts/FcQJwoSwJF0YFjlwEXYERrSQzEx423w PgumwtL/WKmTGPJyK/E63hxq3XjCq0ehe9Xv2dL56ucVG5SGg+G5EzCmK+DNAKqG0/Oz xnXQaY3Va/uOAtUAZFkfdx2scpeYwrr33SVlXm9A7NDDtZTTeuaqqyjSoO7B19cX4NLu 1kcbjZzOB+jyDQudqNyfW4IjXZo20+7Ajaj2/RJML1J5/ZCiJv9vMPMBD6rDlXHSnYd3 v2wsmHK8JEGshl4lWmIBKAviyXKazbP8Xxu3v8B0BXE+KnjwAhwFgDgs8L0s+9SLrTmI +KHw== Received: by 10.42.54.133 with SMTP id r5mr8920054icg.9.1344254304776; Mon, 06 Aug 2012 04:58:24 -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 u8csp436658igz; Mon, 6 Aug 2012 04:58:24 -0700 (PDT) Received: by 10.236.145.40 with SMTP id o28mr9640814yhj.70.1344254303961; Mon, 06 Aug 2012 04:58:23 -0700 (PDT) Received: from mail-gh0-f178.google.com (mail-gh0-f178.google.com [209.85.160.178]) by mx.google.com with ESMTPS id c26si8082775anp.137.2012.08.06.04.58.23 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:58:23 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.178 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.178 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-gh0-f178.google.com with SMTP id f1so2748350ghb.37 for ; Mon, 06 Aug 2012 04:58:23 -0700 (PDT) Received: by 10.66.75.168 with SMTP id d8mr17693341paw.63.1344254303391; Mon, 06 Aug 2012 04:58:23 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id sk5sm8844705pbc.7.2012.08.06.04.58.20 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:58:22 -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 19/27] ASoC: wm8955: Use module_i2c_driver Date: Mon, 6 Aug 2012 17:25:52 +0530 Message-Id: <1344254160-6615-20-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: ALoCoQlW8B6BvWT6HpMSm03q8ZzsqbD10ep2qN8h1iwVX5GmoQGhp1jjkNwuKu9ph+o/VOn4p1A5 module_i2c_driver makes the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat --- sound/soc/codecs/wm8955.c | 18 +----------------- 1 files changed, 1 insertions(+), 17 deletions(-) diff --git a/sound/soc/codecs/wm8955.c b/sound/soc/codecs/wm8955.c index 61fe974..2f1c075 100644 --- a/sound/soc/codecs/wm8955.c +++ b/sound/soc/codecs/wm8955.c @@ -1071,23 +1071,7 @@ static struct i2c_driver wm8955_i2c_driver = { .id_table = wm8955_i2c_id, }; -static int __init wm8955_modinit(void) -{ - int ret = 0; - ret = i2c_add_driver(&wm8955_i2c_driver); - if (ret != 0) { - printk(KERN_ERR "Failed to register WM8955 I2C driver: %d\n", - ret); - } - return ret; -} -module_init(wm8955_modinit); - -static void __exit wm8955_exit(void) -{ - i2c_del_driver(&wm8955_i2c_driver); -} -module_exit(wm8955_exit); +module_i2c_driver(wm8955_i2c_driver); MODULE_DESCRIPTION("ASoC WM8955 driver"); MODULE_AUTHOR("Mark Brown ");