From patchwork Mon Aug 6 11:55:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 10527 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 56EFC24027 for ; Mon, 6 Aug 2012 11:58:13 +0000 (UTC) Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.213.180]) by fiordland.canonical.com (Postfix) with ESMTP id 2789BA18609 for ; Mon, 6 Aug 2012 11:58:13 +0000 (UTC) Received: by mail-yx0-f180.google.com with SMTP id q6so2363924yen.11 for ; Mon, 06 Aug 2012 04:58:12 -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=+REdUI845As5Of7alWUVaHxZA6nS9ga/ixQeuWEOFQI=; b=S0eQ/petsObUlxNzP+hBINobuKy5if0GGhp/CgBWh+i8DVjv0ksO9QF+fj52j0fxqs biwZ845PmSyo5+an1GRrMGtBtKns1gydGEoJoFwjXKROv9JVimXpsVhXOiivKjyBsX0M PRDeIQEIgOGepw27+ksJBF0HRJ9Sz6K+WXu/LrpWv60qL6U7ibIgwt/HWkbdNW/F43uh EUkmqqfOkgY9UXJqZeELLzECf2BpNKa+YhefaN/MxosvPqG3U759m+WizFIZB72hYtcN LbalcepqlxQrzjXYorMvNVHQuSQ8OD+bvS9rfajwz79EKWgKWV+WwYRQ1lHh/ODtG2jI GPjA== Received: by 10.50.47.161 with SMTP id e1mr5030014ign.11.1344254292714; Mon, 06 Aug 2012 04:58:12 -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 u8csp436648igz; Mon, 6 Aug 2012 04:58:12 -0700 (PDT) Received: by 10.236.190.163 with SMTP id e23mr9434239yhn.36.1344254291888; Mon, 06 Aug 2012 04:58:11 -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 v9si5500295ani.169.2012.08.06.04.58.11 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:58:11 -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 ghbf1 with SMTP id f1so2748701ghb.37 for ; Mon, 06 Aug 2012 04:58:11 -0700 (PDT) Received: by 10.66.73.5 with SMTP id h5mr17650786pav.79.1344254291378; Mon, 06 Aug 2012 04:58:11 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id sk5sm8844705pbc.7.2012.08.06.04.58.08 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:58:10 -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 15/27] ASoC: ak4671: Use module_i2c_driver Date: Mon, 6 Aug 2012 17:25:48 +0530 Message-Id: <1344254160-6615-16-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: ALoCoQk+gNcz9o6BcmYNTYBPYkyvd43kNGMUH+FtjXghZgDRpQ9CwrIFhVrRWUSTkd3W4ab7mOi7 module_i2c_driver makes the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat --- sound/soc/codecs/ak4671.c | 12 +----------- 1 files changed, 1 insertions(+), 11 deletions(-) diff --git a/sound/soc/codecs/ak4671.c b/sound/soc/codecs/ak4671.c index 5fb7c2a..2b45797 100644 --- a/sound/soc/codecs/ak4671.c +++ b/sound/soc/codecs/ak4671.c @@ -696,17 +696,7 @@ static struct i2c_driver ak4671_i2c_driver = { .id_table = ak4671_i2c_id, }; -static int __init ak4671_modinit(void) -{ - return i2c_add_driver(&ak4671_i2c_driver); -} -module_init(ak4671_modinit); - -static void __exit ak4671_exit(void) -{ - i2c_del_driver(&ak4671_i2c_driver); -} -module_exit(ak4671_exit); +module_i2c_driver(ak4671_i2c_driver); MODULE_DESCRIPTION("ASoC AK4671 codec driver"); MODULE_AUTHOR("Joonyoung Shim ");