From patchwork Mon Aug 6 11:55:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 10525 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 AD0F024027 for ; Mon, 6 Aug 2012 11:58:07 +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 7D3D4A18609 for ; Mon, 6 Aug 2012 11:58:07 +0000 (UTC) Received: by mail-yw0-f52.google.com with SMTP id p61so485685yhp.11 for ; Mon, 06 Aug 2012 04:58:07 -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=I84Gcof6wuZl5n1d0gMss5eZIL0J1NenGKkl/AQKlVk=; b=o0V5Tbab42+EHUkJjqETNYlXM+yFskaealg3z8E9AfclZCo+K76sj9y+EkHXECx7nr 02gQGBVN7Z0kM/QlGnNNwyZeS54e0AI2winbuPkA2GmtAhmdyhfn1VnBJYHEWKnmvJTe Vn/WTB2MX1AK2gpnPnOU+HDUabn4Qdb15wpfjXu53Ycr3MMNrNvIK8gL79ldkIW00J32 PDd2Z8Nipv0agj5H5AK0fQMgt4oPH73VWU5ftFvFgCmYRfJkl+/G38oOtQEpXNCvFptc ad6NtmUWpI++P+yVXRb4229NsbKV/C8ERTwNDubV29p0H0+3tp4ICqf4axkdcMrz4Fk9 s7pg== Received: by 10.50.219.226 with SMTP id pr2mr5062432igc.51.1344254286929; Mon, 06 Aug 2012 04:58:06 -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 u8csp436637igz; Mon, 6 Aug 2012 04:58:06 -0700 (PDT) Received: by 10.68.228.102 with SMTP id sh6mr18634264pbc.134.1344254286342; Mon, 06 Aug 2012 04:58:06 -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.05 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:58:05 -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:05 -0700 (PDT) Received: by 10.68.235.68 with SMTP id uk4mr18375376pbc.52.1344254285554; Mon, 06 Aug 2012 04:58:05 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id sk5sm8844705pbc.7.2012.08.06.04.58.02 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:58:05 -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 13/27] ASoC: max9850: Use module_i2c_driver Date: Mon, 6 Aug 2012 17:25:46 +0530 Message-Id: <1344254160-6615-14-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: ALoCoQlW0fSKPkYe4zYPxNq2Oc4mw5+BCnOzawpuerLK66z3ied1PhbN83YSCv1q6CyWEqvRIOf+ module_i2c_driver makes the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat --- sound/soc/codecs/max9850.c | 12 +----------- 1 files changed, 1 insertions(+), 11 deletions(-) diff --git a/sound/soc/codecs/max9850.c b/sound/soc/codecs/max9850.c index a191309..efe535c 100644 --- a/sound/soc/codecs/max9850.c +++ b/sound/soc/codecs/max9850.c @@ -369,17 +369,7 @@ static struct i2c_driver max9850_i2c_driver = { .id_table = max9850_i2c_id, }; -static int __init max9850_init(void) -{ - return i2c_add_driver(&max9850_i2c_driver); -} -module_init(max9850_init); - -static void __exit max9850_exit(void) -{ - i2c_del_driver(&max9850_i2c_driver); -} -module_exit(max9850_exit); +module_i2c_driver(max9850_i2c_driver); MODULE_AUTHOR("Christian Glindkamp "); MODULE_DESCRIPTION("ASoC MAX9850 codec driver");