From patchwork Mon Aug 6 11:55:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 10521 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 723E724027 for ; Mon, 6 Aug 2012 11:57:55 +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 3E7FFA18609 for ; Mon, 6 Aug 2012 11:57:55 +0000 (UTC) Received: by ggnf1 with SMTP id f1so2364996ggn.11 for ; Mon, 06 Aug 2012 04:57:54 -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=k3eHTNiwUxFkdH1asWri4Ny6OrgGH9jem9vUvcFT3Go=; b=C7zPNaNoWt6I29wNVu6C8/PO1T0k++xFymlaBJy39XtcUR0HkLuUoPgeJDjhuNrXat VNWKbSjnqBk3efYLOREjAVj9XqfO+6ywq56Ov2s43GY0CwASl5mf0uh40OX7ELF7fWMf 4QDDEJj5XVGkCSofMVL2JpQmgOGzfYjR9OQAc7NV7TMwgm74NCzJgcnbe8YsNFz66o75 QBzV9HLV6Aez61SPglsJ05w6bc+xGOxWEdcDIZ7uvJnEn9SZ+4CuocCy5YDDlbeB00W/ dlEb4J0IZMi7ukNHhkdUicS9odXrRPGOu3kDeGYPLFm+4Yn5owxNPm6bN/q1RjbcbPhF JwBw== Received: by 10.50.213.39 with SMTP id np7mr5082656igc.51.1344254274371; Mon, 06 Aug 2012 04:57:54 -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 u8csp436616igz; Mon, 6 Aug 2012 04:57:54 -0700 (PDT) Received: by 10.50.207.37 with SMTP id lt5mr1676828igc.60.1344254274076; Mon, 06 Aug 2012 04:57:54 -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.53 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:57:54 -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:53 -0700 (PDT) Received: by 10.68.221.1 with SMTP id qa1mr14060298pbc.7.1344254273839; Mon, 06 Aug 2012 04:57:53 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id sk5sm8844705pbc.7.2012.08.06.04.57.50 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:57:53 -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 09/27] ASoC: tlv320aic3x: Use module_i2c_driver Date: Mon, 6 Aug 2012 17:25:42 +0530 Message-Id: <1344254160-6615-10-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: ALoCoQnwTcDsi78zwmMIHR2oBHcybmh3aco587Y5qfzfwUaX/5fGhDJhRYgE3Sec3jr4tDKtZ7j9 module_i2c_driver makes the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat --- sound/soc/codecs/tlv320aic3x.c | 18 +----------------- 1 files changed, 1 insertions(+), 17 deletions(-) diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index dc78f5a..01485bd 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c @@ -1499,23 +1499,7 @@ static struct i2c_driver aic3x_i2c_driver = { .id_table = aic3x_i2c_id, }; -static int __init aic3x_modinit(void) -{ - int ret = 0; - ret = i2c_add_driver(&aic3x_i2c_driver); - if (ret != 0) { - printk(KERN_ERR "Failed to register TLV320AIC3x I2C driver: %d\n", - ret); - } - return ret; -} -module_init(aic3x_modinit); - -static void __exit aic3x_exit(void) -{ - i2c_del_driver(&aic3x_i2c_driver); -} -module_exit(aic3x_exit); +module_i2c_driver(aic3x_i2c_driver); MODULE_DESCRIPTION("ASoC TLV320AIC3X codec driver"); MODULE_AUTHOR("Vladimir Barinov");