Commit b177bc91 authored by Ameya Palande's avatar Ameya Palande Committed by Chris Ball

mmc: sdhci-pci: Fix checkpatch.pl errors

This patch fixes 21 errors and 6 warnings reported by checkpatch.pl.
Signed-off-by: default avatarAmeya Palande <2ameya@gmail.com>
Reviewed-by: default avatarWolfram Sang <w.sang@pengutronix.de>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 14e7dc76
...@@ -18,11 +18,9 @@ ...@@ -18,11 +18,9 @@
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/mmc/host.h> #include <linux/mmc/host.h>
#include <linux/scatterlist.h>
#include <asm/scatterlist.h> #include <linux/io.h>
#include <asm/io.h>
#include "sdhci.h" #include "sdhci.h"
...@@ -46,14 +44,14 @@ struct sdhci_pci_slot; ...@@ -46,14 +44,14 @@ struct sdhci_pci_slot;
struct sdhci_pci_fixes { struct sdhci_pci_fixes {
unsigned int quirks; unsigned int quirks;
int (*probe)(struct sdhci_pci_chip*); int (*probe) (struct sdhci_pci_chip *);
int (*probe_slot)(struct sdhci_pci_slot*); int (*probe_slot) (struct sdhci_pci_slot *);
void (*remove_slot)(struct sdhci_pci_slot*, int); void (*remove_slot) (struct sdhci_pci_slot *, int);
int (*suspend)(struct sdhci_pci_chip*, int (*suspend) (struct sdhci_pci_chip *,
pm_message_t); pm_message_t);
int (*resume)(struct sdhci_pci_chip*); int (*resume) (struct sdhci_pci_chip *);
}; };
struct sdhci_pci_slot { struct sdhci_pci_slot {
...@@ -402,7 +400,7 @@ static int jmicron_suspend(struct sdhci_pci_chip *chip, pm_message_t state) ...@@ -402,7 +400,7 @@ static int jmicron_suspend(struct sdhci_pci_chip *chip, pm_message_t state)
if (chip->pdev->device == PCI_DEVICE_ID_JMICRON_JMB38X_MMC || if (chip->pdev->device == PCI_DEVICE_ID_JMICRON_JMB38X_MMC ||
chip->pdev->device == PCI_DEVICE_ID_JMICRON_JMB388_ESD) { chip->pdev->device == PCI_DEVICE_ID_JMICRON_JMB388_ESD) {
for (i = 0;i < chip->num_slots;i++) for (i = 0; i < chip->num_slots; i++)
jmicron_enable_mmc(chip->slots[i]->host, 0); jmicron_enable_mmc(chip->slots[i]->host, 0);
} }
...@@ -415,7 +413,7 @@ static int jmicron_resume(struct sdhci_pci_chip *chip) ...@@ -415,7 +413,7 @@ static int jmicron_resume(struct sdhci_pci_chip *chip)
if (chip->pdev->device == PCI_DEVICE_ID_JMICRON_JMB38X_MMC || if (chip->pdev->device == PCI_DEVICE_ID_JMICRON_JMB38X_MMC ||
chip->pdev->device == PCI_DEVICE_ID_JMICRON_JMB388_ESD) { chip->pdev->device == PCI_DEVICE_ID_JMICRON_JMB388_ESD) {
for (i = 0;i < chip->num_slots;i++) for (i = 0; i < chip->num_slots; i++)
jmicron_enable_mmc(chip->slots[i]->host, 1); jmicron_enable_mmc(chip->slots[i]->host, 1);
} }
...@@ -798,7 +796,7 @@ static struct sdhci_ops sdhci_pci_ops = { ...@@ -798,7 +796,7 @@ static struct sdhci_ops sdhci_pci_ops = {
#ifdef CONFIG_PM #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_chip *chip;
struct sdhci_pci_slot *slot; struct sdhci_pci_slot *slot;
...@@ -810,7 +808,7 @@ static int sdhci_pci_suspend (struct pci_dev *pdev, pm_message_t state) ...@@ -810,7 +808,7 @@ static int sdhci_pci_suspend (struct pci_dev *pdev, pm_message_t state)
if (!chip) if (!chip)
return 0; return 0;
for (i = 0;i < chip->num_slots;i++) { for (i = 0; i < chip->num_slots; i++) {
slot = chip->slots[i]; slot = chip->slots[i];
if (!slot) if (!slot)
continue; continue;
...@@ -818,7 +816,7 @@ static int sdhci_pci_suspend (struct pci_dev *pdev, pm_message_t state) ...@@ -818,7 +816,7 @@ static int sdhci_pci_suspend (struct pci_dev *pdev, pm_message_t state)
ret = sdhci_suspend_host(slot->host, state); ret = sdhci_suspend_host(slot->host, state);
if (ret) { if (ret) {
for (i--;i >= 0;i--) for (i--; i >= 0; i--)
sdhci_resume_host(chip->slots[i]->host); sdhci_resume_host(chip->slots[i]->host);
return ret; return ret;
} }
...@@ -833,7 +831,7 @@ static int sdhci_pci_suspend (struct pci_dev *pdev, pm_message_t state) ...@@ -833,7 +831,7 @@ static int sdhci_pci_suspend (struct pci_dev *pdev, pm_message_t state)
if (chip->fixes && chip->fixes->suspend) { if (chip->fixes && chip->fixes->suspend) {
ret = chip->fixes->suspend(chip, state); ret = chip->fixes->suspend(chip, state);
if (ret) { 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); sdhci_resume_host(chip->slots[i]->host);
return ret; return ret;
} }
...@@ -855,7 +853,7 @@ static int sdhci_pci_suspend (struct pci_dev *pdev, pm_message_t state) ...@@ -855,7 +853,7 @@ static int sdhci_pci_suspend (struct pci_dev *pdev, pm_message_t state)
return 0; 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_chip *chip;
struct sdhci_pci_slot *slot; struct sdhci_pci_slot *slot;
...@@ -877,7 +875,7 @@ static int sdhci_pci_resume (struct pci_dev *pdev) ...@@ -877,7 +875,7 @@ static int sdhci_pci_resume (struct pci_dev *pdev)
return ret; return ret;
} }
for (i = 0;i < chip->num_slots;i++) { for (i = 0; i < chip->num_slots; i++) {
slot = chip->slots[i]; slot = chip->slots[i];
if (!slot) if (!slot)
continue; continue;
...@@ -1059,7 +1057,7 @@ static int __devinit sdhci_pci_probe(struct pci_dev *pdev, ...@@ -1059,7 +1057,7 @@ static int __devinit sdhci_pci_probe(struct pci_dev *pdev,
} }
chip->pdev = 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) if (chip->fixes)
chip->quirks = chip->fixes->quirks; chip->quirks = chip->fixes->quirks;
chip->num_slots = slots; chip->num_slots = slots;
...@@ -1074,10 +1072,10 @@ static int __devinit sdhci_pci_probe(struct pci_dev *pdev, ...@@ -1074,10 +1072,10 @@ static int __devinit sdhci_pci_probe(struct pci_dev *pdev,
slots = chip->num_slots; /* Quirk may have changed this */ 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); slot = sdhci_pci_probe_slot(pdev, chip, first_bar + i);
if (IS_ERR(slot)) { if (IS_ERR(slot)) {
for (i--;i >= 0;i--) for (i--; i >= 0; i--)
sdhci_pci_remove_slot(chip->slots[i]); sdhci_pci_remove_slot(chip->slots[i]);
ret = PTR_ERR(slot); ret = PTR_ERR(slot);
goto free; goto free;
...@@ -1105,7 +1103,7 @@ static void __devexit sdhci_pci_remove(struct pci_dev *pdev) ...@@ -1105,7 +1103,7 @@ static void __devexit sdhci_pci_remove(struct pci_dev *pdev)
chip = pci_get_drvdata(pdev); chip = pci_get_drvdata(pdev);
if (chip) { 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]); sdhci_pci_remove_slot(chip->slots[i]);
pci_set_drvdata(pdev, NULL); pci_set_drvdata(pdev, NULL);
...@@ -1116,9 +1114,9 @@ static void __devexit sdhci_pci_remove(struct pci_dev *pdev) ...@@ -1116,9 +1114,9 @@ static void __devexit sdhci_pci_remove(struct pci_dev *pdev)
} }
static struct pci_driver sdhci_driver = { static struct pci_driver sdhci_driver = {
.name = "sdhci-pci", .name = "sdhci-pci",
.id_table = pci_ids, .id_table = pci_ids,
.probe = sdhci_pci_probe, .probe = sdhci_pci_probe,
.remove = __devexit_p(sdhci_pci_remove), .remove = __devexit_p(sdhci_pci_remove),
.suspend = sdhci_pci_suspend, .suspend = sdhci_pci_suspend,
.resume = sdhci_pci_resume, .resume = sdhci_pci_resume,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment