From patchwork Mon Aug 6 11:55:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 10533 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 9809824027 for ; Mon, 6 Aug 2012 11:58:31 +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 60510A18609 for ; Mon, 6 Aug 2012 11:58:31 +0000 (UTC) Received: by mail-gh0-f180.google.com with SMTP id g10so608079ghb.11 for ; Mon, 06 Aug 2012 04:58:31 -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=pXH9gSl4Fo2ZguCiyenw9iYBbMKSLKaZ7yfL2KPba9Y=; b=FLj33jYdYtvKauiI2BvHSjCUJK1J4yJPQuWxA8NTUcjis3Kt4skuACYt2OZXhnKXni /AYf/TZPXGVdKa27SAU/detOA+SxjFxZ4LP+9IswJ8LAsOftkEUZ0XG956727gGLiZlX vxbGIhoVd1rLgqWXhMw1EvE2sW7TWRNJM3fAQefeu96FequtkPujpf4zjxH9hGFoYLCn RmlKuiIIcwM73cEswElt6156nHT0t4WsRvIJMmgPUIuLxaQAFJzfAvoZl51aAYyOjpEN QCmMjujtN/1YhrYCfkcH2VvOhO5i4sm7oUiHhDGo0gx1oYeNbn63NcWS2j0hHWv21/mh P87Q== Received: by 10.42.123.130 with SMTP id s2mr3360062icr.50.1344254310650; Mon, 06 Aug 2012 04:58:30 -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 u8csp436670igz; Mon, 6 Aug 2012 04:58:30 -0700 (PDT) Received: by 10.68.224.39 with SMTP id qz7mr18370661pbc.127.1344254310079; Mon, 06 Aug 2012 04:58:30 -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.29 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:58:30 -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:29 -0700 (PDT) Received: by 10.68.234.70 with SMTP id uc6mr18359245pbc.44.1344254309831; Mon, 06 Aug 2012 04:58:29 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id sk5sm8844705pbc.7.2012.08.06.04.58.27 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:58:29 -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 21/27] ASoC: wm2000: Use module_i2c_driver Date: Mon, 6 Aug 2012 17:25:54 +0530 Message-Id: <1344254160-6615-22-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: ALoCoQky6VheIzaInkggOEYspvFC67L8sKLNVzyQwWFqjKO7+FKu7GitA8Frc9TNpUIHkj7Cib58 module_i2c_driver makes the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat --- sound/soc/codecs/wm2000.c | 12 +----------- 1 files changed, 1 insertions(+), 11 deletions(-) diff --git a/sound/soc/codecs/wm2000.c b/sound/soc/codecs/wm2000.c index 3fd5b29..89cd6fc 100644 --- a/sound/soc/codecs/wm2000.c +++ b/sound/soc/codecs/wm2000.c @@ -858,17 +858,7 @@ static struct i2c_driver wm2000_i2c_driver = { .id_table = wm2000_i2c_id, }; -static int __init wm2000_init(void) -{ - return i2c_add_driver(&wm2000_i2c_driver); -} -module_init(wm2000_init); - -static void __exit wm2000_exit(void) -{ - i2c_del_driver(&wm2000_i2c_driver); -} -module_exit(wm2000_exit); +module_i2c_driver(wm2000_i2c_driver); MODULE_DESCRIPTION("ASoC WM2000 driver"); MODULE_AUTHOR("Mark Brown ");