From patchwork Tue Sep 4 11:28: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: 11165 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 D08E023E00 for ; Tue, 4 Sep 2012 11:31:20 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 680ECA19164 for ; Tue, 4 Sep 2012 11:30:30 +0000 (UTC) Received: by iafj25 with SMTP id j25so8126657iaf.11 for ; Tue, 04 Sep 2012 04:31:19 -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:x-gm-message-state; bh=tnmuoAkLFG4N8SSQC2C9AvLLbrXxU8Nxk9JeJxN2VKY=; b=Ld5VNLvEwNSVrSzmnS7C4DN4CAxNdW7svV9SuWvmdLSdBgjNz5bmlHC5OJV0BrNM++ jLFJpq+nY2loU4YFx/ogF6eAIkjyfVYtIDquuhswc7qRnJXCdLsTcucOkpF/jPzuf+6n VLMGkb9kjCrrAi1caj9sdL/0+af1fpC6Gk7WLu82olRieUpAeuSc0PlodV4oeCkRI9H8 cDVSkn6jIFcCoqkP9czgGO8AdzSNhvr6FEWQEnLA+Wu7reVlDmf19+VuiPja1+sJc2gQ jGy35oUDRr3+wR1PqgI298HchM7f8IdG8rQfGGz0422cCTIHDgDewZwTC6vHdnc1xlmS N1tA== Received: by 10.50.237.41 with SMTP id uz9mr13408334igc.43.1346758279780; Tue, 04 Sep 2012 04:31:19 -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.184.232 with SMTP id ex8csp183661igc; Tue, 4 Sep 2012 04:31:19 -0700 (PDT) Received: by 10.66.76.106 with SMTP id j10mr40479527paw.51.1346758278495; Tue, 04 Sep 2012 04:31:18 -0700 (PDT) Received: from mail-pz0-f50.google.com (mail-pz0-f50.google.com [209.85.210.50]) by mx.google.com with ESMTPS id ot8si26969460pbb.339.2012.09.04.04.31.18 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 04 Sep 2012 04:31:18 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.210.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.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 dade7 with SMTP id e7so4724045dad.37 for ; Tue, 04 Sep 2012 04:31:18 -0700 (PDT) Received: by 10.68.213.5 with SMTP id no5mr46014903pbc.24.1346758277901; Tue, 04 Sep 2012 04:31:17 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id jz4sm12035250pbc.17.2012.09.04.04.31.14 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 04 Sep 2012 04:31:16 -0700 (PDT) From: Sachin Kamat To: spi-devel-general@lists.sourceforge.net Cc: grant.likely@secretlab.ca, broonie@opensource.wolfsonmicro.com, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH] spi: spi-tle62x0: Use module_spi_driver macro Date: Tue, 4 Sep 2012 16:58:35 +0530 Message-Id: <1346758115-13150-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQm6vN5VmLhaeCghWXNFnPFjtQ/nT+gnASbFK+byr2AIe3dPy/VWfB2afxl3OsGuzjkvPgdG module_spi_driver eliminates module_init and module_exit calls and makes the code simpler. Signed-off-by: Sachin Kamat --- drivers/spi/spi-tle62x0.c | 13 +------------ 1 files changed, 1 insertions(+), 12 deletions(-) diff --git a/drivers/spi/spi-tle62x0.c b/drivers/spi/spi-tle62x0.c index 0ce5c12..2442102 100644 --- a/drivers/spi/spi-tle62x0.c +++ b/drivers/spi/spi-tle62x0.c @@ -316,18 +316,7 @@ static struct spi_driver tle62x0_driver = { .remove = __devexit_p(tle62x0_remove), }; -static __init int tle62x0_init(void) -{ - return spi_register_driver(&tle62x0_driver); -} - -static __exit void tle62x0_exit(void) -{ - spi_unregister_driver(&tle62x0_driver); -} - -module_init(tle62x0_init); -module_exit(tle62x0_exit); +module_spi_driver(tle62x0_driver); MODULE_AUTHOR("Ben Dooks "); MODULE_DESCRIPTION("TLE62x0 SPI driver");