From patchwork Mon Aug 6 11:55:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 10532 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 9F7E424027 for ; Mon, 6 Aug 2012 11:58:28 +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 6F73EA18D3D for ; Mon, 6 Aug 2012 11:58:28 +0000 (UTC) Received: by mail-yw0-f52.google.com with SMTP id p61so485685yhp.11 for ; Mon, 06 Aug 2012 04:58:28 -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=G/i5YZ6adXEVCG6wzlxVNOWK5Fqa5W9tWHgDiL2cW+I=; b=iQM3FJUrTDqtNyKxdVLR1++FkZcPQsVL0zlyWOoc4SJeAmDZ8ppYipAqfbkIAADfRK I61jCjYi/tMOdhkbKJHwEmHfmbSHmjeIvftU8V5UGLnI1Z5blq+yJVfStyl1tzzJOg+Q cVlF3IGGwE/GL5O0rP5dwAgNessiInerUxXhPBCghMBNBAD9r6Rc3oNiWE970U/aSG9O wq9lU3yfQFC89myv1buK3xl2C+E1OpfbUax822m0nnzOGswz1TiCzlfFp+ocJaKdMKdD API1UWiB7nMUba93cOjGXOTLfZVYF+A7IK1B4BXrQzzKXfkWIe0jIV+5OvEGhT61P3Tz wJ7g== Received: by 10.50.219.194 with SMTP id pq2mr5036333igc.25.1344254307669; Mon, 06 Aug 2012 04:58:27 -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 u8csp436662igz; Mon, 6 Aug 2012 04:58:27 -0700 (PDT) Received: by 10.66.74.67 with SMTP id r3mr589706pav.1.1344254307066; Mon, 06 Aug 2012 04:58:27 -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 ic1si1856974pbc.49.2012.08.06.04.58.26 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:58:27 -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 mail-pb0-f50.google.com with SMTP id md12so4269630pbc.37 for ; Mon, 06 Aug 2012 04:58:26 -0700 (PDT) Received: by 10.68.217.100 with SMTP id ox4mr18375078pbc.87.1344254306844; Mon, 06 Aug 2012 04:58:26 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id sk5sm8844705pbc.7.2012.08.06.04.58.23 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:58:26 -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 20/27] ASoC: wm2200: Use module_i2c_driver Date: Mon, 6 Aug 2012 17:25:53 +0530 Message-Id: <1344254160-6615-21-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: ALoCoQl4x2C1By9VtSXamh2HW5raJUE+ExUZs3/v3cdXcsQ+EPzZ06kk3vc88YNrtwZ1I/lUUZeh module_i2c_driver makes the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat --- sound/soc/codecs/wm2200.c | 12 +----------- 1 files changed, 1 insertions(+), 11 deletions(-) diff --git a/sound/soc/codecs/wm2200.c b/sound/soc/codecs/wm2200.c index 32682c1..71debd0 100644 --- a/sound/soc/codecs/wm2200.c +++ b/sound/soc/codecs/wm2200.c @@ -2270,17 +2270,7 @@ static struct i2c_driver wm2200_i2c_driver = { .id_table = wm2200_i2c_id, }; -static int __init wm2200_modinit(void) -{ - return i2c_add_driver(&wm2200_i2c_driver); -} -module_init(wm2200_modinit); - -static void __exit wm2200_exit(void) -{ - i2c_del_driver(&wm2200_i2c_driver); -} -module_exit(wm2200_exit); +module_i2c_driver(wm2200_i2c_driver); MODULE_DESCRIPTION("ASoC WM2200 driver"); MODULE_AUTHOR("Mark Brown ");