From patchwork Mon Aug 6 11:55:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 10524 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 897D324027 for ; Mon, 6 Aug 2012 11:58:04 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id 5960EA18609 for ; Mon, 6 Aug 2012 11:58:04 +0000 (UTC) Received: by mail-gg0-f180.google.com with SMTP id f1so2364996ggn.11 for ; Mon, 06 Aug 2012 04:58:04 -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=Q+fWTpN2sdfWmpADqTRdxhp3tVI4ahYhPXBxBhk50Pk=; b=QqOV2rUi+6DMjpfDXn+rdpEI4MAcxy6iWVoXtqOAD0/O04Lr7JTr2O6z8CFmS2gBfH WjCcGwCaWKoVlLpEBuEHyRcWGBgQSTGXeCAyIxMXjVA7+ZKw9tdDYyuxAm0ZUdvBHiJu ilP0w066RcVWX+/c0irVSYdNEthF0LQ11mhKTC2ZYOSp2IYhJIwelcfVTbPe8i2mTJEs I+7MH5oP6ubkNp0n1/3s8DlbIejh6WVmVtrOGlYPin+kX0lFKYe9CBl7jzpK3vky/Oge COkmr/GL/2XmKhEszYJNeiQYBd9n+HfOMxs5P2pVPLInqZmX/SCv1XQUPO487JRU2WrH +SCA== Received: by 10.50.160.168 with SMTP id xl8mr5025526igb.25.1344254283851; Mon, 06 Aug 2012 04:58:03 -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 u8csp436629igz; Mon, 6 Aug 2012 04:58:03 -0700 (PDT) Received: by 10.101.4.25 with SMTP id g25mr2924784ani.44.1344254283124; Mon, 06 Aug 2012 04:58:03 -0700 (PDT) Received: from mail-yx0-f178.google.com (mail-yx0-f178.google.com [209.85.213.178]) by mx.google.com with ESMTPS id f13si2486257anb.176.2012.08.06.04.58.02 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:58:03 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.213.178 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.213.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.213.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 mail-yx0-f178.google.com with SMTP id m2so327141yen.37 for ; Mon, 06 Aug 2012 04:58:02 -0700 (PDT) Received: by 10.66.83.234 with SMTP id t10mr17671665pay.39.1344254282526; Mon, 06 Aug 2012 04:58:02 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id sk5sm8844705pbc.7.2012.08.06.04.57.59 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:58:01 -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 12/27] ASoC: adau1701: Use module_i2c_driver Date: Mon, 6 Aug 2012 17:25:45 +0530 Message-Id: <1344254160-6615-13-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: ALoCoQkO7e+/jD5XEqSHxVBDumWpWaIjrY8s6NjkTBsVzv5JlVZARe+jWnVQwCTT2YoCmk6q9i+o module_i2c_driver makes the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat --- sound/soc/codecs/adau1701.c | 12 +----------- 1 files changed, 1 insertions(+), 11 deletions(-) diff --git a/sound/soc/codecs/adau1701.c b/sound/soc/codecs/adau1701.c index 3d50fc8..51f2f3c 100644 --- a/sound/soc/codecs/adau1701.c +++ b/sound/soc/codecs/adau1701.c @@ -527,17 +527,7 @@ static struct i2c_driver adau1701_i2c_driver = { .id_table = adau1701_i2c_id, }; -static int __init adau1701_init(void) -{ - return i2c_add_driver(&adau1701_i2c_driver); -} -module_init(adau1701_init); - -static void __exit adau1701_exit(void) -{ - i2c_del_driver(&adau1701_i2c_driver); -} -module_exit(adau1701_exit); +module_i2c_driver(adau1701_i2c_driver); MODULE_DESCRIPTION("ASoC ADAU1701 SigmaDSP driver"); MODULE_AUTHOR("Cliff Cai ");