From patchwork Mon Aug 6 11:55:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 10535 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 595F024027 for ; Mon, 6 Aug 2012 11:58:37 +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 22DE1A18288 for ; Mon, 6 Aug 2012 11:58:37 +0000 (UTC) Received: by mail-gh0-f180.google.com with SMTP id g10so608079ghb.11 for ; Mon, 06 Aug 2012 04:58:37 -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=l9kJSPnKdVGwUHFRI0suLwGpZUN1u1EE7xRBcYebO5M=; b=WEYJO9cVahVkovNRlKbjSMKelTsbsppZP6lg1eGu/n2LfLfPqjD20IBjOjzcONqirg TY7ui2hjjY85htGNDuY6ZJRp1hUIygJ2zPx5pnTF9wc5hz5UYc/Ow3fEHdhVswTNyJgn NI5HSmzcZo9DpJ1nfDB05emL7GsJ6aStK/waQK8RifrvgrOfjz3Y7JowDVCpvUk2ZuBn hw/KVqLq7d+glVsmUcy3bgvfwKYFGuPLuprq6UDTOpGub+dtb1DP9ft3VTKED+4mwswd qMAUfB9U5S9nDNVIu7BUcqFLng/xad+eCipgkcrnTWRqHxRiDEvz8VbN28h8n6Ui8bjV xUEA== Received: by 10.50.47.161 with SMTP id e1mr5030893ign.11.1344254316532; Mon, 06 Aug 2012 04:58:36 -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 u8csp436676igz; Mon, 6 Aug 2012 04:58:36 -0700 (PDT) Received: by 10.68.136.38 with SMTP id px6mr18396454pbb.103.1344254315980; Mon, 06 Aug 2012 04:58:35 -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.35 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:58:35 -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:35 -0700 (PDT) Received: by 10.68.224.70 with SMTP id ra6mr18263806pbc.11.1344254315722; Mon, 06 Aug 2012 04:58:35 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id sk5sm8844705pbc.7.2012.08.06.04.58.33 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:58:35 -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 23/27] ASoC: wm8961: Use module_i2c_driver Date: Mon, 6 Aug 2012 17:25:56 +0530 Message-Id: <1344254160-6615-24-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: ALoCoQkOa2zK3cuAcmSe32MQPYp7CsyGlJPU82j5wnzZByerTy4BKMJT96lJ6+IEt3DFxtGdMIUO module_i2c_driver makes the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat --- sound/soc/codecs/wm8961.c | 18 +----------------- 1 files changed, 1 insertions(+), 17 deletions(-) diff --git a/sound/soc/codecs/wm8961.c b/sound/soc/codecs/wm8961.c index 01edbcc..719fb69 100644 --- a/sound/soc/codecs/wm8961.c +++ b/sound/soc/codecs/wm8961.c @@ -1114,23 +1114,7 @@ static struct i2c_driver wm8961_i2c_driver = { .id_table = wm8961_i2c_id, }; -static int __init wm8961_modinit(void) -{ - int ret = 0; - ret = i2c_add_driver(&wm8961_i2c_driver); - if (ret != 0) { - printk(KERN_ERR "Failed to register wm8961 I2C driver: %d\n", - ret); - } - return ret; -} -module_init(wm8961_modinit); - -static void __exit wm8961_exit(void) -{ - i2c_del_driver(&wm8961_i2c_driver); -} -module_exit(wm8961_exit); +module_i2c_driver(wm8961_i2c_driver); MODULE_DESCRIPTION("ASoC WM8961 driver"); MODULE_AUTHOR("Mark Brown ");