From patchwork Mon Aug 6 11:55:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 10528 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 8533B24027 for ; Mon, 6 Aug 2012 11:58:16 +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 223F3A18288 for ; Mon, 6 Aug 2012 11:58:16 +0000 (UTC) Received: by mail-yx0-f180.google.com with SMTP id q6so2363924yen.11 for ; Mon, 06 Aug 2012 04:58:16 -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=xpJOHnvIWy0Y8KA3ZiSP/V238djZygZFlVJv0kEhLNM=; b=gOmcawQToc59EGqz6FobEkdD0ix/DlnyTRxlCunOfTQp8N98kvXQJzqASu0fcNbhg+ m0+K6AXlgJcYTLvV4LtiqY8a7h+nybgSmpH5UDVlhtaCeLDpUatvnztSBoom5nDwi5MQ djf6dhJcXu576SqIz5JcHfvf8KGvDR9Eut+loxhg6AsLkS/IjgfcIoO9tnHKCEZe4xKL fbbmMzF/Pblx/uuomUI+FFUUukWm3+8QT6fV8KOFKl1nv+kechW4h9FGdlvJ26iL7ucg U+NOpQYobeR2I1Z/h6yVPivbLYnVTwehMmNO7NiQqoiFP+DKsuGa7xPm842eaTIVnttV 95Tg== Received: by 10.43.46.194 with SMTP id up2mr8817019icb.22.1344254295506; Mon, 06 Aug 2012 04:58:15 -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 u8csp436650igz; Mon, 6 Aug 2012 04:58:15 -0700 (PDT) Received: by 10.236.180.42 with SMTP id i30mr9410998yhm.89.1344254294732; Mon, 06 Aug 2012 04:58:14 -0700 (PDT) Received: from mail-gh0-f178.google.com (mail-gh0-f178.google.com [209.85.160.178]) by mx.google.com with ESMTPS id c26si8082775anp.137.2012.08.06.04.58.14 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:58:14 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.178 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.178 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-gh0-f178.google.com with SMTP id f1so2748350ghb.37 for ; Mon, 06 Aug 2012 04:58:14 -0700 (PDT) Received: by 10.66.77.168 with SMTP id t8mr17672019paw.28.1344254294311; Mon, 06 Aug 2012 04:58:14 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id sk5sm8844705pbc.7.2012.08.06.04.58.11 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:58:13 -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 16/27] ASoC: lm4857: Use module_i2c_driver Date: Mon, 6 Aug 2012 17:25:49 +0530 Message-Id: <1344254160-6615-17-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: ALoCoQmEIB1E31j+DqKb5p61+KLtkxgIUid70Ong9Z9VSXGIRDFddKMOVIAe+HQuAi8BLDX+5hwD module_i2c_driver makes the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat --- sound/soc/codecs/lm4857.c | 12 +----------- 1 files changed, 1 insertions(+), 11 deletions(-) diff --git a/sound/soc/codecs/lm4857.c b/sound/soc/codecs/lm4857.c index ba4fafb..81a328c 100644 --- a/sound/soc/codecs/lm4857.c +++ b/sound/soc/codecs/lm4857.c @@ -250,17 +250,7 @@ static struct i2c_driver lm4857_i2c_driver = { .id_table = lm4857_i2c_id, }; -static int __init lm4857_init(void) -{ - return i2c_add_driver(&lm4857_i2c_driver); -} -module_init(lm4857_init); - -static void __exit lm4857_exit(void) -{ - i2c_del_driver(&lm4857_i2c_driver); -} -module_exit(lm4857_exit); +module_i2c_driver(lm4857_i2c_driver); MODULE_AUTHOR("Lars-Peter Clausen "); MODULE_DESCRIPTION("LM4857 amplifier driver");