From patchwork Mon Aug 6 11:55:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 10537 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 3D61224027 for ; Mon, 6 Aug 2012 11:58:43 +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 0D7FEA18609 for ; Mon, 6 Aug 2012 11:58:42 +0000 (UTC) Received: by mail-yx0-f180.google.com with SMTP id q6so2363924yen.11 for ; Mon, 06 Aug 2012 04:58: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=/M0XyolQNu94AQd1RsNWLwJ6fNTi77kS88P/k/vcD9M=; b=TPdEIIEIbPgXyoQEQeAYNLG6BUzF+fIRtv9H+NELAU9WHPMqGZnam9/eBj/ei6QfJh hCJ5jRqQrItwWmgUSWAzoaiyft85fZBqrjvjGJ7Z38YTMfmPRpHQh9QSoOvIyWxsiF2i QudrK4hDxmNhuO1xQEwQz6ywLygO6+21HUoD/vAKWFwS9drHK8g/IGHJGYjyq3jQGEj9 DHON377UwVmVQO5LDOCdZw6xxa31ap95LwfgKFxAmdIKvUf/y9iM4wqS3x1j+9SrLFe6 IQX2MIRNwYNBg2dql5PuodDo98DVMzspuLS3D4ZLx1A3OAo6CLXqxFGYPgoUJPYn20TE IzWQ== Received: by 10.50.94.166 with SMTP id dd6mr5063459igb.11.1344254322431; Mon, 06 Aug 2012 04:58: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 u8csp436688igz; Mon, 6 Aug 2012 04:58:42 -0700 (PDT) Received: by 10.68.239.164 with SMTP id vt4mr9397645pbc.118.1344254321914; Mon, 06 Aug 2012 04:58:41 -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.58.41 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:58:41 -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:58:41 -0700 (PDT) Received: by 10.68.234.6 with SMTP id ua6mr18652108pbc.117.1344254321655; Mon, 06 Aug 2012 04:58:41 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id sk5sm8844705pbc.7.2012.08.06.04.58.38 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:58:41 -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 25/27] ASoC: adau1373: Use module_i2c_driver Date: Mon, 6 Aug 2012 17:25:58 +0530 Message-Id: <1344254160-6615-26-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: ALoCoQn/i2jzmbv3ZVt52umU67cHOalQhw9SHQSwZ5xn1Trw3rK6yzMr3Ghv7jpzpF6LqV+GpYH/ module_i2c_driver makes the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat --- sound/soc/codecs/adau1373.c | 12 +----------- 1 files changed, 1 insertions(+), 11 deletions(-) diff --git a/sound/soc/codecs/adau1373.c b/sound/soc/codecs/adau1373.c index 44f5906..704544b 100644 --- a/sound/soc/codecs/adau1373.c +++ b/sound/soc/codecs/adau1373.c @@ -1392,17 +1392,7 @@ static struct i2c_driver adau1373_i2c_driver = { .id_table = adau1373_i2c_id, }; -static int __init adau1373_init(void) -{ - return i2c_add_driver(&adau1373_i2c_driver); -} -module_init(adau1373_init); - -static void __exit adau1373_exit(void) -{ - i2c_del_driver(&adau1373_i2c_driver); -} -module_exit(adau1373_exit); +module_i2c_driver(adau1373_i2c_driver); MODULE_DESCRIPTION("ASoC ADAU1373 driver"); MODULE_AUTHOR("Lars-Peter Clausen ");