From patchwork Mon Aug 6 11:55:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 10516 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 E833C24027 for ; Mon, 6 Aug 2012 11:57:38 +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 B7451A18D3E for ; Mon, 6 Aug 2012 11:57:38 +0000 (UTC) Received: by mail-gh0-f180.google.com with SMTP id g10so608079ghb.11 for ; Mon, 06 Aug 2012 04:57:38 -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=cTvKl+iYC3UWYHBKXJv0dV2JFo+oN/n4v7kaB+5rSYM=; b=E+t0tveoXotUPnSJ5HcBHsGp2sA6qj7col0V3gZWKqED88g1vrTFJ9mf0RkSnpO8Gp Cn9cARhsFG+pxlQFl+jouVttSFSqwsCTwLZ+ZqjKMCgbwHxy5qlET/lSDQWI3hmh0m5D JVHgZEFQRRzdDgXrKaP2cQ/1UYoJY/d9QuuHshfsergEZ43TKnO9NeiRyfjI6JESEiOA N0COJfbbz2F0u06BJa+ei/XDLj5IulwOsL2+q5dPHhN/+sAxpMcDcSmBN+lAcgSTvBam 0AX7fOJfl+HVRfJ0JrxwRNu/fkQcNnkFHJkMSh3Ez1f6GKyPCo9ThYJmEWvsuMk+5a5y Qcdg== Received: by 10.50.219.226 with SMTP id pr2mr5061326igc.51.1344254258156; Mon, 06 Aug 2012 04:57:38 -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 u8csp436591igz; Mon, 6 Aug 2012 04:57:37 -0700 (PDT) Received: by 10.68.237.103 with SMTP id vb7mr18332761pbc.38.1344254257571; Mon, 06 Aug 2012 04:57:37 -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.57.37 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:57:37 -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:57:37 -0700 (PDT) Received: by 10.68.220.231 with SMTP id pz7mr18322171pbc.110.1344254257320; Mon, 06 Aug 2012 04:57:37 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id sk5sm8844705pbc.7.2012.08.06.04.57.34 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:57:36 -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 04/27] ASoC: cs42l51: Use module_i2c_driver Date: Mon, 6 Aug 2012 17:25:37 +0530 Message-Id: <1344254160-6615-5-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: ALoCoQnt1NGkEIs2hzMSmuHRYnvgVm0VQ81Rsqfea8A12joM+QWeemykZe5oNYICpQFmjZCdtsGu module_i2c_driver makes the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat --- sound/soc/codecs/cs42l51.c | 19 +------------------ 1 files changed, 1 insertions(+), 18 deletions(-) diff --git a/sound/soc/codecs/cs42l51.c b/sound/soc/codecs/cs42l51.c index 091d019..1e0fa3b 100644 --- a/sound/soc/codecs/cs42l51.c +++ b/sound/soc/codecs/cs42l51.c @@ -614,24 +614,7 @@ static struct i2c_driver cs42l51_i2c_driver = { .remove = cs42l51_i2c_remove, }; -static int __init cs42l51_init(void) -{ - int ret; - - ret = i2c_add_driver(&cs42l51_i2c_driver); - if (ret != 0) { - printk(KERN_ERR "%s: can't add i2c driver\n", __func__); - return ret; - } - return 0; -} -module_init(cs42l51_init); - -static void __exit cs42l51_exit(void) -{ - i2c_del_driver(&cs42l51_i2c_driver); -} -module_exit(cs42l51_exit); +module_i2c_driver(cs42l51_i2c_driver); MODULE_AUTHOR("Arnaud Patard "); MODULE_DESCRIPTION("Cirrus Logic CS42L51 ALSA SoC Codec Driver");