From patchwork Mon Sep 13 17:39:51 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Cox X-Patchwork-Id: 178452 Return-path: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on void.printf.net X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.9 tests=RCVD_IN_DNSWL_LOW autolearn=disabled version=3.2.5 Envelope-to: chris@printf.net Delivery-date: Mon, 13 Sep 2010 19:24:51 +0100 Received: from lists.laptop.org ([18.85.2.145] helo=mail.laptop.org) by void.printf.net with esmtp (Exim 4.69) (envelope-from ) id 1OvDhy-0000yy-Uw for chris@printf.net; Mon, 13 Sep 2010 19:24:51 +0100 Received: by mail.laptop.org (Postfix) id 8273D241FE; Mon, 13 Sep 2010 14:24:30 -0400 (EDT) Delivered-To: cjb@laptop.org Received: from spam.laptop.org (spam.laptop.org [18.85.46.23]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.laptop.org (Postfix) with ESMTPS id 67CED241FA for ; Mon, 13 Sep 2010 14:24:30 -0400 (EDT) X-ASG-Debug-ID: 1284402288-0b74d78f0001-zHW3sV Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by spam.laptop.org with ESMTP id sBO1Zsnmil9kDViN for ; Mon, 13 Sep 2010 14:24:48 -0400 (EDT) X-Barracuda-Envelope-From: linux-mmc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754787Ab0IMSYY (ORCPT ); Mon, 13 Sep 2010 14:24:24 -0400 Received: from mga01.intel.com ([192.55.52.88]:56992 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754785Ab0IMSYX (ORCPT ); Mon, 13 Sep 2010 14:24:23 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 13 Sep 2010 11:24:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.56,360,1280732400"; d="scan'208";a="606517060" Received: from unknown (HELO localhost.localdomain) ([10.255.14.44]) by fmsmga002.fm.intel.com with ESMTP; 13 Sep 2010 11:24:22 -0700 From: Alan Cox X-ASG-Orig-Subj: [PATCH 6/7] sdhci_pci: Tidy this as well Subject: [PATCH 6/7] sdhci_pci: Tidy this as well To: linux-mmc@vger.kernel.org, cjb@laptop.org Date: Mon, 13 Sep 2010 18:39:51 +0100 Message-ID: <20100913173948.20345.65227.stgit@localhost.localdomain> In-Reply-To: <20100913172738.20345.61119.stgit@localhost.localdomain> References: <20100913172738.20345.61119.stgit@localhost.localdomain> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Barracuda-Connect: vger.kernel.org[209.132.180.67] X-Barracuda-Start-Time: 1284402288 X-Barracuda-URL: http://18.85.46.23:8000/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at laptop.org X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=5.5 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.40764 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c index bb14047..9692eab 100644 --- a/drivers/mmc/host/sdhci-pci.c +++ b/drivers/mmc/host/sdhci-pci.c @@ -21,8 +21,8 @@ #include -#include -#include +#include +#include #include "sdhci.h" @@ -46,14 +46,14 @@ struct sdhci_pci_slot; struct sdhci_pci_fixes { unsigned int quirks; - int (*probe)(struct sdhci_pci_chip*); + int (*probe)(struct sdhci_pci_chip *); - int (*probe_slot)(struct sdhci_pci_slot*); - void (*remove_slot)(struct sdhci_pci_slot*, int); + int (*probe_slot)(struct sdhci_pci_slot *); + void (*remove_slot)(struct sdhci_pci_slot *, int); - int (*suspend)(struct sdhci_pci_chip*, + int (*suspend)(struct sdhci_pci_chip *, pm_message_t); - int (*resume)(struct sdhci_pci_chip*); + int (*resume)(struct sdhci_pci_chip *); /* Allow the driver to override some operations for particularly quirky chips */ @@ -287,7 +287,7 @@ static int jmicron_suspend(struct sdhci_pci_chip *chip, pm_message_t state) int i; if (chip->pdev->device == PCI_DEVICE_ID_JMICRON_JMB38X_MMC) { - for (i = 0;i < chip->num_slots;i++) + for (i = 0; i < chip->num_slots; i++) jmicron_enable_mmc(chip->slots[i]->host, 0); } @@ -299,7 +299,7 @@ static int jmicron_resume(struct sdhci_pci_chip *chip) int ret, i; if (chip->pdev->device == PCI_DEVICE_ID_JMICRON_JMB38X_MMC) { - for (i = 0;i < chip->num_slots;i++) + for (i = 0; i < chip->num_slots; i++) jmicron_enable_mmc(chip->slots[i]->host, 1); } @@ -401,7 +401,8 @@ static const struct sdhci_pci_fixes sdhci_via = { .probe = via_probe, }; -#if defined(CONFIG_MMC_SDHCI_INTEL_MID) || defined(CONFIG_MMC_SDHCI_INTEL_MID_MODULE) +#if defined(CONFIG_MMC_SDHCI_INTEL_MID) || \ + defined(CONFIG_MMC_SDHCI_INTEL_MID_MODULE) /* * ADMA operation is disabled for Moorestown platform due to @@ -536,7 +537,8 @@ static const struct pci_device_id pci_ids[] __devinitdata = { .driver_data = (kernel_ulong_t)&sdhci_via, }, -#if defined(CONFIG_MMC_SDHCI_INTEL_MID) || defined(CONFIG_MMC_SDHCI_INTEL_MID_MODULE) +#if defined(CONFIG_MMC_SDHCI_INTEL_MID) || \ + defined(CONFIG_MMC_SDHCI_INTEL_MID_MODULE) { .vendor = PCI_VENDOR_ID_INTEL, .device = PCI_DEVICE_ID_INTEL_MRST_SD0, @@ -646,7 +648,7 @@ static struct sdhci_ops sdhci_pci_ops = { #ifdef CONFIG_PM -static int sdhci_pci_suspend (struct pci_dev *pdev, pm_message_t state) +static int sdhci_pci_suspend(struct pci_dev *pdev, pm_message_t state) { struct sdhci_pci_chip *chip; struct sdhci_pci_slot *slot; @@ -657,7 +659,7 @@ static int sdhci_pci_suspend (struct pci_dev *pdev, pm_message_t state) if (!chip) return 0; - for (i = 0;i < chip->num_slots;i++) { + for (i = 0; i < chip->num_slots; i++) { slot = chip->slots[i]; if (!slot) continue; @@ -665,7 +667,7 @@ static int sdhci_pci_suspend (struct pci_dev *pdev, pm_message_t state) ret = sdhci_suspend_host(slot->host, state); if (ret) { - for (i--;i >= 0;i--) + for (i--; i >= 0; i--) sdhci_resume_host(chip->slots[i]->host); return ret; } @@ -676,7 +678,7 @@ static int sdhci_pci_suspend (struct pci_dev *pdev, pm_message_t state) if (chip->fixes && chip->fixes->suspend) { ret = chip->fixes->suspend(chip, state); if (ret) { - for (i = chip->num_slots - 1;i >= 0;i--) + for (i = chip->num_slots - 1; i >= 0; i--) sdhci_resume_host(chip->slots[i]->host); return ret; } @@ -696,7 +698,7 @@ static int sdhci_pci_suspend (struct pci_dev *pdev, pm_message_t state) return 0; } -static int sdhci_pci_resume (struct pci_dev *pdev) +static int sdhci_pci_resume(struct pci_dev *pdev) { struct sdhci_pci_chip *chip; struct sdhci_pci_slot *slot; @@ -718,7 +720,7 @@ static int sdhci_pci_resume (struct pci_dev *pdev) return ret; } - for (i = 0;i < chip->num_slots;i++) { + for (i = 0; i < chip->num_slots; i++) { slot = chip->slots[i]; if (!slot) continue; @@ -908,7 +910,7 @@ static int __devinit sdhci_pci_probe(struct pci_dev *pdev, } chip->pdev = pdev; - chip->fixes = (const struct sdhci_pci_fixes*)ent->driver_data; + chip->fixes = (const struct sdhci_pci_fixes *)ent->driver_data; if (chip->fixes) chip->quirks = chip->fixes->quirks; chip->num_slots = slots; @@ -923,10 +925,10 @@ static int __devinit sdhci_pci_probe(struct pci_dev *pdev, slots = chip->num_slots; /* Quirk may have changed this */ - for (i = 0;i < slots;i++) { + for (i = 0; i < slots; i++) { slot = sdhci_pci_probe_slot(pdev, chip, first_bar + i); if (IS_ERR(slot)) { - for (i--;i >= 0;i--) + for (i--; i >= 0; i--) sdhci_pci_remove_slot(chip->slots[i]); ret = PTR_ERR(slot); goto free; @@ -954,7 +956,7 @@ static void __devexit sdhci_pci_remove(struct pci_dev *pdev) chip = pci_get_drvdata(pdev); if (chip) { - for (i = 0;i < chip->num_slots; i++) + for (i = 0; i < chip->num_slots; i++) sdhci_pci_remove_slot(chip->slots[i]); pci_set_drvdata(pdev, NULL); @@ -965,9 +967,9 @@ static void __devexit sdhci_pci_remove(struct pci_dev *pdev) } static struct pci_driver sdhci_driver = { - .name = "sdhci-pci", + .name = "sdhci-pci", .id_table = pci_ids, - .probe = sdhci_pci_probe, + .probe = sdhci_pci_probe, .remove = __devexit_p(sdhci_pci_remove), .suspend = sdhci_pci_suspend, .resume = sdhci_pci_resume,