From patchwork Mon Aug 6 11:55:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 10523 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 DC1D324027 for ; Mon, 6 Aug 2012 11:58:00 +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 A5953A18609 for ; Mon, 6 Aug 2012 11:58:00 +0000 (UTC) Received: by mail-yw0-f52.google.com with SMTP id p61so485685yhp.11 for ; Mon, 06 Aug 2012 04:58:00 -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=QJE/cAH3qltz++ZixmdZo7PwsKI17RS+8BlvveFBgK8=; b=DaJzArMd3ROGBLvqFIxgGX3xFieP8TKYI2E98cAvXA8vYgwXKT/yCEDVh3Wk4sRFz7 q+NYfRtZVUPLW8CEFPovUxYSpPQgXf2QRvGsFCHPMIUChHIi2/ha1CwSI7fBJIOp+JdN Bl0yDiYBeTVPFkKMWZIF6NVY9w94geqmOjnGcQ+VJllJWaohDm9VhJm3Xdo4HVODeU4N YxiX09zhpwynR7QwivSlVkDRW+ER0gW/YJ3srqXtJcwpLZ6SaSjcm7JDuR7d2ND0uyM+ QhJ1o2/JcW2u2iJZsds0ewLzcmjGdmSZ1841LqUWNOWz19GSQ6hIyTLDUUShogCI+Vxz 0F/A== Received: by 10.50.46.132 with SMTP id v4mr5018415igm.25.1344254280169; Mon, 06 Aug 2012 04:58:00 -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 u8csp436623igz; Mon, 6 Aug 2012 04:57:59 -0700 (PDT) Received: by 10.50.95.230 with SMTP id dn6mr4212385igb.16.1344254279876; Mon, 06 Aug 2012 04:57:59 -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 s5si5258006icw.68.2012.08.06.04.57.59 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:57:59 -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 md12so4269799pbc.37 for ; Mon, 06 Aug 2012 04:57:59 -0700 (PDT) Received: by 10.68.134.161 with SMTP id pl1mr18353781pbb.29.1344254279632; Mon, 06 Aug 2012 04:57:59 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id sk5sm8844705pbc.7.2012.08.06.04.57.56 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:57:59 -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 11/27] ASoC: tlv320dac33: Use module_i2c_driver Date: Mon, 6 Aug 2012 17:25:44 +0530 Message-Id: <1344254160-6615-12-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: ALoCoQmEWLY1BQ2gCW7LMgBYVkUrIe2E2A5qWjRdCCz8wNPhnBy9j05oAQESKTEHTJSf/3myH9iO module_i2c_driver makes the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat --- sound/soc/codecs/tlv320dac33.c | 19 +------------------ 1 files changed, 1 insertions(+), 18 deletions(-) diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c index 0dd4107..d2e16c5 100644 --- a/sound/soc/codecs/tlv320dac33.c +++ b/sound/soc/codecs/tlv320dac33.c @@ -1621,24 +1621,7 @@ static struct i2c_driver tlv320dac33_i2c_driver = { .id_table = tlv320dac33_i2c_id, }; -static int __init dac33_module_init(void) -{ - int r; - r = i2c_add_driver(&tlv320dac33_i2c_driver); - if (r < 0) { - printk(KERN_ERR "DAC33: driver registration failed\n"); - return r; - } - return 0; -} -module_init(dac33_module_init); - -static void __exit dac33_module_exit(void) -{ - i2c_del_driver(&tlv320dac33_i2c_driver); -} -module_exit(dac33_module_exit); - +module_i2c_driver(tlv320dac33_i2c_driver); MODULE_DESCRIPTION("ASoC TLV320DAC33 codec driver"); MODULE_AUTHOR("Peter Ujfalusi ");