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: 1401851 Return-Path: X-Original-To: patchwork-spi-devel-general@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by patchwork2.kernel.org (Postfix) with ESMTP id 1735DDF280 for ; Tue, 4 Sep 2012 11:31:32 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-1.v29.ch3.sourceforge.com) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1T8rLt-0008Dr-2C; Tue, 04 Sep 2012 11:31:29 +0000 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1T8rLr-0008Dk-Qd for spi-devel-general@lists.sourceforge.net; Tue, 04 Sep 2012 11:31:27 +0000 Received: from mail-pb0-f47.google.com ([209.85.160.47]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1T8rLn-0000e3-RS for spi-devel-general@lists.sourceforge.net; Tue, 04 Sep 2012 11:31:27 +0000 Received: by pbcwy7 with SMTP id wy7so8279474pbc.34 for ; Tue, 04 Sep 2012 04:31:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=tnmuoAkLFG4N8SSQC2C9AvLLbrXxU8Nxk9JeJxN2VKY=; b=phK7HQocRpUJQnM7bNq1OC/yIwiQTHX80ekPv3hrYBhwjTmgaqHkWkkaoyBM5gMZGP 7lFskGNA04A34Lu9ZR3Az/BP5Q9NW47MUx7BnepaUcMislV+Gkt+ahkqcL4mH1R6jyD6 XXT8708Ihi9liJ6YcH+F4Mg5gfb14fmSgVSvxzdBpPCmKaay+rXmL1gxaUAE1KbTxCMp s2YG+i7iBgJvpQ6+yitCcQgxLWEj9SeUvoSHOjPJX/9XlN57/ah4aNSVhWdkTk/snJzc +gR1tc5NH2oBAD8aAvpuzmZXD4gB+YLhbYDy7dI2UHzFiISgaisN6OUzc6gdym+yhM02 BrHA== 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 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: ALoCoQmxn4dLVtU3zCH0D2KY7bPExP27Mpbg+JXYKxWMz6KPS3rzOh7J0lKfVRxs39evILlCbQ5/ X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. X-Headers-End: 1T8rLn-0000e3-RS Cc: sachin.kamat@linaro.org, broonie@opensource.wolfsonmicro.com, patches@linaro.org X-BeenThere: spi-devel-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux SPI core/device drivers discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: spi-devel-general-bounces@lists.sourceforge.net 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");