From patchwork Mon Aug 6 11:55:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 10518 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 091EE24027 for ; Mon, 6 Aug 2012 11:57:45 +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 CC8A9A18288 for ; Mon, 6 Aug 2012 11:57:44 +0000 (UTC) Received: by mail-yx0-f180.google.com with SMTP id q6so2363924yen.11 for ; Mon, 06 Aug 2012 04:57:44 -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=os9AZcoju7HO3xAVHNQxE9dCT7Uh8ha9mnf85KZ5uAM=; b=KwZsbva8fiO/iE8PgY+jRfWGe56LNsHpi8ChbBj2YjvSg5AtOfkYJ4RQunh8x0EWT1 DV3mbo+hqLJ3+Xo7NRZ2OI/nzGKwOuhL+TpjvPx5yBO7AN28mhKxxdEAQzsCVX97W6BA 5QPO1ih274Wgqsed0KvXgA/4L6Shn+eQyxrekf9tMApZ75bsSaz+qjk07LFrgMTD7aHL q7tRTKLl2SG8ea1ldEa5E5/TWtr1+AOITx68C5ytI7A35qQSkzd19Jot9Nmtq3vFqJo9 uqfglt8TZ0sDrfypfKnTJUpRAwm+meFhuVvEhKCKQJ34YH8DUkxkH+bT5D36Zupgjkci ydAA== Received: by 10.50.46.132 with SMTP id v4mr5017781igm.25.1344254264058; Mon, 06 Aug 2012 04:57:44 -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 u8csp436604igz; Mon, 6 Aug 2012 04:57:43 -0700 (PDT) Received: by 10.50.183.202 with SMTP id eo10mr2627508igc.0.1344254263781; Mon, 06 Aug 2012 04:57:43 -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.43 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:57:43 -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:43 -0700 (PDT) Received: by 10.68.224.70 with SMTP id ra6mr18257910pbc.11.1344254263492; Mon, 06 Aug 2012 04:57:43 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id sk5sm8844705pbc.7.2012.08.06.04.57.40 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:57:42 -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 06/27] ASoC: wm9090: Use module_i2c_driver Date: Mon, 6 Aug 2012 17:25:39 +0530 Message-Id: <1344254160-6615-7-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: ALoCoQk0fts76ViF5M56nWbubm98pMH/JxuhpkXm9njzyK0/cagxK8IYUpchX0/7qFZd+DUi6V3D module_i2c_driver makes the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat --- sound/soc/codecs/wm9090.c | 12 +----------- 1 files changed, 1 insertions(+), 11 deletions(-) diff --git a/sound/soc/codecs/wm9090.c b/sound/soc/codecs/wm9090.c index 2c2346f..c7ddc56 100644 --- a/sound/soc/codecs/wm9090.c +++ b/sound/soc/codecs/wm9090.c @@ -695,17 +695,7 @@ static struct i2c_driver wm9090_i2c_driver = { .id_table = wm9090_id, }; -static int __init wm9090_init(void) -{ - return i2c_add_driver(&wm9090_i2c_driver); -} -module_init(wm9090_init); - -static void __exit wm9090_exit(void) -{ - i2c_del_driver(&wm9090_i2c_driver); -} -module_exit(wm9090_exit); +module_i2c_driver(wm9090_i2c_driver); MODULE_AUTHOR("Mark Brown "); MODULE_DESCRIPTION("WM9090 ASoC driver");