From patchwork Mon Aug 6 11:55:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 10517 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 1109E24027 for ; Mon, 6 Aug 2012 11:57:43 +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 D215BA18D3D for ; Mon, 6 Aug 2012 11:57:42 +0000 (UTC) Received: by mail-gh0-f180.google.com with SMTP id g10so608079ghb.11 for ; Mon, 06 Aug 2012 04:57:42 -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=rpNZan1CD39MmjmJgtAA1Oh4j1oKm2IWLnPliDYMDc0=; b=ihY17iQ0y9VY+E1zUCih4PbPszJOW5FkUNekiv+LdkazLHkzfN4K3fPtijUW/0idQa 2HZbJGBCuYQmXzaTqOBQ8e4kEmQ4yJDQc/dBlo+4TjsGEnssdHnbiLV1c5YwOjKEtVie 6Y6SxSA7q1vjJVlxXXLDa99BccxCihmfQ38Fq2XMw8TLHMPfsnv0L1ND9tzPc+T0zawj Bc5oa3dA4vNF2WlKowYtdavBT0nzk79Max66tofg8tsp7AJAifJHjB2SEIwqeLuaN0IZ Qgy0TNKMd9eHcbHZ1OomOReQfemHmr79XS5uO8+M9WQyk+WYio2SaEXbZ0lVq0hD42nY 7NtQ== Received: by 10.50.94.166 with SMTP id dd6mr5061133igb.11.1344254262003; Mon, 06 Aug 2012 04:57:42 -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 u8csp436596igz; Mon, 6 Aug 2012 04:57:41 -0700 (PDT) Received: by 10.236.79.100 with SMTP id h64mr9686003yhe.50.1344254261156; Mon, 06 Aug 2012 04:57:41 -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.41 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:57:41 -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:41 -0700 (PDT) Received: by 10.66.76.135 with SMTP id k7mr17690093paw.2.1344254260568; Mon, 06 Aug 2012 04:57:40 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id sk5sm8844705pbc.7.2012.08.06.04.57.37 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:57:39 -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 05/27] ASoC: tpa6130a2: Use module_i2c_driver Date: Mon, 6 Aug 2012 17:25:38 +0530 Message-Id: <1344254160-6615-6-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: ALoCoQm143ZfJfR081x/iRRq/l53Ll6P44zjOm1Eti1vslesCtTf5daWQO/eVh4sn31M1jIkBIbG module_i2c_driver makes the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat --- sound/soc/codecs/tpa6130a2.c | 13 +------------ 1 files changed, 1 insertions(+), 12 deletions(-) diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c index 6fe4aa3..565ff39 100644 --- a/sound/soc/codecs/tpa6130a2.c +++ b/sound/soc/codecs/tpa6130a2.c @@ -487,19 +487,8 @@ static struct i2c_driver tpa6130a2_i2c_driver = { .id_table = tpa6130a2_id, }; -static int __init tpa6130a2_init(void) -{ - return i2c_add_driver(&tpa6130a2_i2c_driver); -} - -static void __exit tpa6130a2_exit(void) -{ - i2c_del_driver(&tpa6130a2_i2c_driver); -} +module_i2c_driver(tpa6130a2_i2c_driver); MODULE_AUTHOR("Peter Ujfalusi "); MODULE_DESCRIPTION("TPA6130A2 Headphone amplifier driver"); MODULE_LICENSE("GPL"); - -module_init(tpa6130a2_init); -module_exit(tpa6130a2_exit);