From patchwork Mon Aug 6 11:55:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 10522 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 F406B24027 for ; Mon, 6 Aug 2012 11:57:58 +0000 (UTC) Received: from mail-gh0-f180.google.com (mail-gh0-f180.google.com [209.85.160.180]) by fiordland.canonical.com (Postfix) with ESMTP id C3392A18609 for ; Mon, 6 Aug 2012 11:57:58 +0000 (UTC) Received: by mail-gh0-f180.google.com with SMTP id g10so608079ghb.11 for ; Mon, 06 Aug 2012 04:57:58 -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=gjlx+HNgLg1O+WCott+nPiWHmpyNHGtldf2xVDb0Whk=; b=E0BFLB4S0g1LXqUHEHkITtYzMhjGQDzqaU8SxYCdMbxyfvChiV5FsX/SEI6lkSbzQY 8/0sNumRaN9GjLJqquUE+aMh8hax9U+GHpqNw+d76e4JLyz3J6hIf70iwiGG5Sp8Omxg G2T96i4Q2y4+1PB2u53ly6Au/yfqylqszmQN/bG96bWzLMG3MydP1seJWJ8FkUeGD2ia E0wUfT0zNc26aPvfgXEUQby3MPrYvyjlOs84rJTy62iVS0k9Uwi5LbWIrpRym+9NBY+2 utdbZVYPZDJhvTYX8jPmjSJmqxFvQKYQROt0r6+cgkccOnDvKzWI+hdlOBTUtc1zLSM7 Xthw== Received: by 10.50.94.166 with SMTP id dd6mr5061797igb.11.1344254278214; Mon, 06 Aug 2012 04:57:58 -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 u8csp436620igz; Mon, 6 Aug 2012 04:57:57 -0700 (PDT) Received: by 10.236.130.240 with SMTP id k76mr9719419yhi.20.1344254277366; Mon, 06 Aug 2012 04:57:57 -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.57 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:57:57 -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:57 -0700 (PDT) Received: by 10.66.75.104 with SMTP id b8mr17651550paw.21.1344254276750; Mon, 06 Aug 2012 04:57:56 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id sk5sm8844705pbc.7.2012.08.06.04.57.54 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:57:56 -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 10/27] ASoC: sta32x: Use module_i2c_driver Date: Mon, 6 Aug 2012 17:25:43 +0530 Message-Id: <1344254160-6615-11-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: ALoCoQmyVk2wpPsspstHb1GYjhsy+Px8znbyacqVMaS5AYNgQPLth0VS/gXzcK9i/73oezVs8IQ8 module_i2c_driver makes the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat --- sound/soc/codecs/sta32x.c | 12 +----------- 1 files changed, 1 insertions(+), 11 deletions(-) diff --git a/sound/soc/codecs/sta32x.c b/sound/soc/codecs/sta32x.c index 8d717f4..51b7313 100644 --- a/sound/soc/codecs/sta32x.c +++ b/sound/soc/codecs/sta32x.c @@ -1006,17 +1006,7 @@ static struct i2c_driver sta32x_i2c_driver = { .id_table = sta32x_i2c_id, }; -static int __init sta32x_init(void) -{ - return i2c_add_driver(&sta32x_i2c_driver); -} -module_init(sta32x_init); - -static void __exit sta32x_exit(void) -{ - i2c_del_driver(&sta32x_i2c_driver); -} -module_exit(sta32x_exit); +module_i2c_driver(sta32x_i2c_driver); MODULE_DESCRIPTION("ASoC STA32X driver"); MODULE_AUTHOR("Johannes Stezenbach ");