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: 10965 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 C502423E29 for ; Mon, 27 Aug 2012 06:26:08 +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 E790EA18B82 for ; Mon, 27 Aug 2012 06:25:42 +0000 (UTC) Received: by iafj25 with SMTP id j25so4916843iaf.11 for ; Sun, 26 Aug 2012 23:26: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:x-gm-message-state; bh=mg7UoHAJdZK303zm8znqeQ0r5kauK5f83wjhV7aDcNo=; b=aPZ14GrAqYkrkkt0hkJPN66Kh1cHcJDnGaIPlcdX1dtSzIiJjZOy5B2kbCakg8gNHn iwTGeKTRbgkuhcV5LH2quaePEeS0wJgRCNJowDPJIoMOfcz8p1x37jaIWdvuXhvrhtu0 evGfWPA0FOCRLTkk7o3SvB81ayx+gdGCKBwOuuJi5gcFAUz2YpeWIdyNTjJaXqqdld1N Zi/yGmn7gySLDHSRHtNkC8Rt7kXGUWwvs4w7m7EZAs8J4PMOO3xcsyXxNcZDGlwZPnYi S4v0wX/cTecX5fysQZ7+Chb3pF4qrZZj396kVd8hZhfA4173Z5/djR+a5UWUo5Etad1x U0Qg== Received: by 10.50.45.162 with SMTP id o2mr9203727igm.0.1346048767658; Sun, 26 Aug 2012 23:26:07 -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 ex8csp423434igc; Sun, 26 Aug 2012 23:26:06 -0700 (PDT) Received: by 10.66.76.227 with SMTP id n3mr27733321paw.53.1346048766469; Sun, 26 Aug 2012 23:26: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 pv1si30551454pbb.149.2012.08.26.23.26.06 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 26 Aug 2012 23:26:06 -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 pbcmd12 with SMTP id md12so7425371pbc.37 for ; Sun, 26 Aug 2012 23:26:06 -0700 (PDT) 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: ALoCoQm5OXQb1qN3TJvnC6mGWuYsdrht0aymIYWZsiY01WC/AqFVYe7xTYGbgkMwy48pKSYKLqJR 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");