From patchwork Mon Aug 6 11:55:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 10530 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 03B9324027 for ; Mon, 6 Aug 2012 11:58:22 +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 C132EA18609 for ; Mon, 6 Aug 2012 11:58:21 +0000 (UTC) Received: by mail-gh0-f180.google.com with SMTP id g10so608079ghb.11 for ; Mon, 06 Aug 2012 04:58:21 -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=tFvxDrwfST7GpzGE5Z4mhkoIHgqrLWFnLp3wUGkKCUI=; b=ks5vlLAR5CElSKTyohHET9Z5rBufgV/0lS9dwH5ATNvweO/ZV6ONyG9XIyntNWpFHw 3KAB4rWxOTVJB0oXPvCUINMC0UeLKZHjrvBO1SpA653pnMepHHUfUpKIAptEqn3fkiLT NpnkZSmgk9dGBHFPnmwTbHT2Skv+6J6eNBwL7ePQOsCISB3lbrSWoxHXKh0p1Lwsxdys kQ2WlW5chWARIILCHIZbmjBJL6lgNcH9Ie/fzrWvn4Y5oimrUMd/nuHrQVGWc8vrQwtd G2r6psi6j4AmvH0E0Gk3mKi7enKy3NSRkVsrXXAFBO8w5FPoCYNkbL1ZRVsn2HFA6EFe wX6w== Received: by 10.50.219.226 with SMTP id pr2mr5062966igc.51.1344254301081; Mon, 06 Aug 2012 04:58:21 -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 u8csp436656igz; Mon, 6 Aug 2012 04:58:20 -0700 (PDT) Received: by 10.66.77.71 with SMTP id q7mr17723870paw.0.1344254300586; Mon, 06 Aug 2012 04:58:20 -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.20 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:58:20 -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:20 -0700 (PDT) Received: by 10.68.235.68 with SMTP id uk4mr18377107pbc.52.1344254300375; Mon, 06 Aug 2012 04:58:20 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id sk5sm8844705pbc.7.2012.08.06.04.58.17 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:58:19 -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 18/27] ASoC: max98088: Use module_i2c_driver Date: Mon, 6 Aug 2012 17:25:51 +0530 Message-Id: <1344254160-6615-19-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: ALoCoQkiZ+Yezr+KDTtJNUzCyS2xi7apIgjR4xN2z/cMBEU8OdjZAdP/yl0AiTxEaXRVWSyk1RkL module_i2c_driver makes the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat --- sound/soc/codecs/max98088.c | 18 +----------------- 1 files changed, 1 insertions(+), 17 deletions(-) diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c index af7324b..3264a51 100644 --- a/sound/soc/codecs/max98088.c +++ b/sound/soc/codecs/max98088.c @@ -2107,23 +2107,7 @@ static struct i2c_driver max98088_i2c_driver = { .id_table = max98088_i2c_id, }; -static int __init max98088_init(void) -{ - int ret; - - ret = i2c_add_driver(&max98088_i2c_driver); - if (ret) - pr_err("Failed to register max98088 I2C driver: %d\n", ret); - - return ret; -} -module_init(max98088_init); - -static void __exit max98088_exit(void) -{ - i2c_del_driver(&max98088_i2c_driver); -} -module_exit(max98088_exit); +module_i2c_driver(max98088_i2c_driver); MODULE_DESCRIPTION("ALSA SoC MAX98088 driver"); MODULE_AUTHOR("Peter Hsiang, Jesse Marroquin");