From patchwork Mon Aug 6 11:55:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 10513 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 9BF9D24027 for ; Mon, 6 Aug 2012 11:57:30 +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 62195A18609 for ; Mon, 6 Aug 2012 11:57:30 +0000 (UTC) Received: by mail-gh0-f180.google.com with SMTP id g10so608079ghb.11 for ; Mon, 06 Aug 2012 04:57:30 -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=upyX3QG71qRIxS34PEbv/92GuQ1Ol/TFfynVCY4Uosg=; b=dIxpUNcdljZDg1mKzCtz0lDGJ4dW3ZR2QOo9rH9HdJ0ludiHIQWyzMDnvFHX9JsoSn OlAP4h/yBv/ULLS7AGdlhIrNZFBLXO5TISKFReESFyNuwyhupshTPZOg22GvkjHH/jrn PgXYdvvBw63eLfZfaTsXwRykHlP6lpSx9U2SDx3KxcyXEfGkseY67vUGCFlhKHrVafu9 /pel885u1TqBx+t6SfQ9gCa0kKRm/bdjU+kRUStvovQp0xl8ZyxGxFjSt8ElZhy6WbrW zYD9iyGcTCq0QGqo14MXO2wN5LK2UuFz//PpzeQrc5+lReUnWcU2tZe+R8RtlUzsBxkw kJDw== Received: by 10.50.160.168 with SMTP id xl8mr5024199igb.25.1344254249728; Mon, 06 Aug 2012 04:57:29 -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 u8csp436575igz; Mon, 6 Aug 2012 04:57:29 -0700 (PDT) Received: by 10.236.76.234 with SMTP id b70mr9651142yhe.31.1344254248853; Mon, 06 Aug 2012 04:57:28 -0700 (PDT) Received: from mail-gg0-f178.google.com (mail-gg0-f178.google.com [209.85.161.178]) by mx.google.com with ESMTPS id w42si18394290yhd.18.2012.08.06.04.57.28 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:57:28 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.161.178 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.161.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.161.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 ggeh3 with SMTP id h3so774142gge.37 for ; Mon, 06 Aug 2012 04:57:28 -0700 (PDT) Received: by 10.66.75.104 with SMTP id b8mr17648713paw.21.1344254247972; Mon, 06 Aug 2012 04:57:27 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id sk5sm8844705pbc.7.2012.08.06.04.57.25 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 06 Aug 2012 04:57:27 -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 01/27] ASoC: tlv320aic32x4: Use module_i2c_driver Date: Mon, 6 Aug 2012 17:25:34 +0530 Message-Id: <1344254160-6615-2-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: ALoCoQnIW2hzsrbt6wzPPdB+B8Op2FNtsNcRi1ehajvQ0HCmq0gtS9juX3zAQYnAdpYshhEs+FsS module_i2c_driver makes the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat --- sound/soc/codecs/tlv320aic32x4.c | 19 +------------------ 1 files changed, 1 insertions(+), 18 deletions(-) diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c index b0a73d3..f230292 100644 --- a/sound/soc/codecs/tlv320aic32x4.c +++ b/sound/soc/codecs/tlv320aic32x4.c @@ -746,24 +746,7 @@ static struct i2c_driver aic32x4_i2c_driver = { .id_table = aic32x4_i2c_id, }; -static int __init aic32x4_modinit(void) -{ - int ret = 0; - - ret = i2c_add_driver(&aic32x4_i2c_driver); - if (ret != 0) { - printk(KERN_ERR "Failed to register aic32x4 I2C driver: %d\n", - ret); - } - return ret; -} -module_init(aic32x4_modinit); - -static void __exit aic32x4_exit(void) -{ - i2c_del_driver(&aic32x4_i2c_driver); -} -module_exit(aic32x4_exit); +module_i2c_driver(aic32x4_i2c_driver); MODULE_DESCRIPTION("ASoC tlv320aic32x4 codec driver"); MODULE_AUTHOR("Javier Martin ");