From patchwork Mon Aug 27 06:23:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 1376351 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id D72593FC71 for ; Mon, 27 Aug 2012 06:26:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752134Ab2H0G0H (ORCPT ); Mon, 27 Aug 2012 02:26:07 -0400 Received: from mail-pz0-f46.google.com ([209.85.210.46]:55914 "EHLO mail-pz0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752120Ab2H0G0G (ORCPT ); Mon, 27 Aug 2012 02:26:06 -0400 Received: by dady13 with SMTP id y13so2320559dad.19 for ; Sun, 26 Aug 2012 23:26:05 -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=mg7UoHAJdZK303zm8znqeQ0r5kauK5f83wjhV7aDcNo=; b=gkH+7FzmpeNHDoOcQQobuTnbrskyUelD/+sVAggheE8zN5Uz7hf3zBV51Ps2Nu3L0F Uv+Xt74DJReDyH0ngwk/aTHyRi0m9ExZhzsgWAkwzvElxTd6FUMiTcFoIyXpdGLThAXb jW33MXrtppZ0/HFVMXjDgAkniOnvAWU+QGyTBGmzz+12BbrbSUiv6+x4mSDQRAx/FQ0a uCjYg9QFti17nT/o4so7+3hqBr8l0Xg480UPYtX0TYMTalAUj5LexrKy2QikmG1rsGw9 8gvF8Ow32haSssf+rG4gkrV5p4yPlIs8Vo9CkzI9j7GcJn/Al4J46LxrfeLyxQbLEcHo xI8w== Received: by 10.68.135.39 with SMTP id pp7mr12318123pbb.127.1346048765893; Sun, 26 Aug 2012 23:26:05 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id kt8sm14055376pbc.1.2012.08.26.23.26.02 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 26 Aug 2012 23:26:05 -0700 (PDT) From: Sachin Kamat To: linux-mmc@vger.kernel.org Cc: cjb@laptop.org, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH] mmc: mmc_spi: Use module_spi_driver Date: Mon, 27 Aug 2012 11:53:42 +0530 Message-Id: <1346048622-2024-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQn66CiDO58doA/vhZLTs5Ym+trlWqeBy7ZrceIGQM3sN728jboNA15F662/+rCycgyF6h8b Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org module_spi_driver makes the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat --- drivers/mmc/host/mmc_spi.c | 15 +-------------- 1 files changed, 1 insertions(+), 14 deletions(-) diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c index 273306c..a600eab 100644 --- a/drivers/mmc/host/mmc_spi.c +++ b/drivers/mmc/host/mmc_spi.c @@ -1532,20 +1532,7 @@ static struct spi_driver mmc_spi_driver = { .remove = __devexit_p(mmc_spi_remove), }; - -static int __init mmc_spi_init(void) -{ - return spi_register_driver(&mmc_spi_driver); -} -module_init(mmc_spi_init); - - -static void __exit mmc_spi_exit(void) -{ - spi_unregister_driver(&mmc_spi_driver); -} -module_exit(mmc_spi_exit); - +module_spi_driver(mmc_spi_driver); MODULE_AUTHOR("Mike Lavender, David Brownell, " "Hans-Peter Nilsson, Jan Nikitenko");