From patchwork Mon Aug 6 11:55:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 10514 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 C871624027 for ; Mon, 6 Aug 2012 11:57:33 +0000 (UTC) Received: from mail-yw0-f52.google.com (mail-yw0-f52.google.com [209.85.213.52]) by fiordland.canonical.com (Postfix) with ESMTP id 91ADAA18D3D for ; Mon, 6 Aug 2012 11:57:33 +0000 (UTC) Received: by yhpp61 with SMTP id p61so485685yhp.11 for ; Mon, 06 Aug 2012 04:57:33 -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=IkA8Wt+5d+XoEQOv2VaIR0r/dQu9tW3uXabaTxk6EnI=; b=axJ9DLUz6gN4RA3DbZITpyXHYfTvHl9Y/7n6aRfy0MCRHvwv8hIDuYcDWZ0ERvQJsK +n1Kj9W1rQd+l0Y5qRgeQHo6U1RFpyYnwfaaqQEDZqC5wqYQusb/jKaOgbfxKztaJ3kf YHPUIlDv9nC+FHJR9kclWw7kDS3w6byLTZdU2jSp5M4Fbc3WYg4HdPosT2IbBO8qBWTi h0qfzo8Jp9eKjsbOJbrx0On4R5h7TdW6z7tPp64G91/DdvXZzilfkkCRseUyLG0uxiB2 VNY4Jq/06EdSGXjIJ6RVG9xmqCF+DSA8REyM4nq3+i8hvjqz2v6nuFiZXAmgDsrvCQv5 wi/A== Received: by 10.50.47.161 with SMTP id e1mr5028478ign.11.1344254252623; Mon, 06 Aug 2012 04:57:32 -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 u8csp436579igz; Mon, 6 Aug 2012 04:57:31 -0700 (PDT) Received: by 10.236.191.69 with SMTP id f45mr9771719yhn.8.1344254251624; Mon, 06 Aug 2012 04:57:31 -0700 (PDT) Received: from mail-yw0-f50.google.com (mail-yw0-f50.google.com [209.85.213.50]) by mx.google.com with ESMTPS id j6si8450677yhe.89.2012.08.06.04.57.31 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:57:31 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.213.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.213.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.213.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-yw0-f50.google.com with SMTP id j63so2740978yhj.37 for ; Mon, 06 Aug 2012 04:57:31 -0700 (PDT) Received: by 10.68.227.163 with SMTP id sb3mr18720761pbc.74.1344254250869; Mon, 06 Aug 2012 04:57:30 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id sk5sm8844705pbc.7.2012.08.06.04.57.28 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:57:30 -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 02/27] ASoC: max9877: Use module_i2c_driver Date: Mon, 6 Aug 2012 17:25:35 +0530 Message-Id: <1344254160-6615-3-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: ALoCoQlIx6gBySoTuU7RBm/NfIf5gHjp+GYHaC3h7YLsaVgoeo3KkH+C4Q3zQTnpYGsM/VrYHmac module_i2c_driver makes the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat --- sound/soc/codecs/max9877.c | 12 +----------- 1 files changed, 1 insertions(+), 11 deletions(-) diff --git a/sound/soc/codecs/max9877.c b/sound/soc/codecs/max9877.c index 3a2ba3d..d15e594 100644 --- a/sound/soc/codecs/max9877.c +++ b/sound/soc/codecs/max9877.c @@ -291,17 +291,7 @@ static struct i2c_driver max9877_i2c_driver = { .id_table = max9877_i2c_id, }; -static int __init max9877_init(void) -{ - return i2c_add_driver(&max9877_i2c_driver); -} -module_init(max9877_init); - -static void __exit max9877_exit(void) -{ - i2c_del_driver(&max9877_i2c_driver); -} -module_exit(max9877_exit); +module_i2c_driver(max9877_i2c_driver); MODULE_DESCRIPTION("ASoC MAX9877 amp driver"); MODULE_AUTHOR("Joonyoung Shim ");