diff options
author | Ameya Palande <2ameya@gmail.com> | 2011-04-05 14:13:13 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2011-05-24 21:00:41 -0400 |
commit | b177bc9188c04e140e5d8928e88623a92ba751bf (patch) | |
tree | 20dbad913f51c246c38165d6fd9cb128fb365ab5 /drivers/mmc/host/sdhci-pci.c | |
parent | 14e7dc76f24577694f1c121e6ce1fd2f3d46c726 (diff) |
mmc: sdhci-pci: Fix checkpatch.pl errors
This patch fixes 21 errors and 6 warnings reported by checkpatch.pl.
Signed-off-by: Ameya Palande <2ameya@gmail.com>
Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/sdhci-pci.c')
-rw-r--r-- | drivers/mmc/host/sdhci-pci.c | 44 |
1 files changed, 21 insertions, 23 deletions
diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c index f8b5f37007b2..82c5dc412679 100644 --- a/drivers/mmc/host/sdhci-pci.c +++ b/drivers/mmc/host/sdhci-pci.c | |||
@@ -18,11 +18,9 @@ | |||
18 | #include <linux/dma-mapping.h> | 18 | #include <linux/dma-mapping.h> |
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | #include <linux/device.h> | 20 | #include <linux/device.h> |
21 | |||
22 | #include <linux/mmc/host.h> | 21 | #include <linux/mmc/host.h> |
23 | 22 | #include <linux/scatterlist.h> | |
24 | #include <asm/scatterlist.h> | 23 | #include <linux/io.h> |
25 | #include <asm/io.h> | ||
26 | 24 | ||
27 | #include "sdhci.h" | 25 | #include "sdhci.h" |
28 | 26 | ||
@@ -46,14 +44,14 @@ struct sdhci_pci_slot; | |||
46 | struct sdhci_pci_fixes { | 44 | struct sdhci_pci_fixes { |
47 | unsigned int quirks; | 45 | unsigned int quirks; |
48 | 46 | ||
49 | int (*probe)(struct sdhci_pci_chip*); | 47 | int (*probe) (struct sdhci_pci_chip *); |
50 | 48 | ||
51 | int (*probe_slot)(struct sdhci_pci_slot*); | 49 | int (*probe_slot) (struct sdhci_pci_slot *); |
52 | void (*remove_slot)(struct sdhci_pci_slot*, int); | 50 | void (*remove_slot) (struct sdhci_pci_slot *, int); |
53 | 51 | ||
54 | int (*suspend)(struct sdhci_pci_chip*, | 52 | int (*suspend) (struct sdhci_pci_chip *, |
55 | pm_message_t); | 53 | pm_message_t); |
56 | int (*resume)(struct sdhci_pci_chip*); | 54 | int (*resume) (struct sdhci_pci_chip *); |
57 | }; | 55 | }; |
58 | 56 | ||
59 | struct sdhci_pci_slot { | 57 | struct sdhci_pci_slot { |
@@ -402,7 +400,7 @@ static int jmicron_suspend(struct sdhci_pci_chip *chip, pm_message_t state) | |||
402 | 400 | ||
403 | if (chip->pdev->device == PCI_DEVICE_ID_JMICRON_JMB38X_MMC || | 401 | if (chip->pdev->device == PCI_DEVICE_ID_JMICRON_JMB38X_MMC || |
404 | chip->pdev->device == PCI_DEVICE_ID_JMICRON_JMB388_ESD) { | 402 | chip->pdev->device == PCI_DEVICE_ID_JMICRON_JMB388_ESD) { |
405 | for (i = 0;i < chip->num_slots;i++) | 403 | for (i = 0; i < chip->num_slots; i++) |
406 | jmicron_enable_mmc(chip->slots[i]->host, 0); | 404 | jmicron_enable_mmc(chip->slots[i]->host, 0); |
407 | } | 405 | } |
408 | 406 | ||
@@ -415,7 +413,7 @@ static int jmicron_resume(struct sdhci_pci_chip *chip) | |||
415 | 413 | ||
416 | if (chip->pdev->device == PCI_DEVICE_ID_JMICRON_JMB38X_MMC || | 414 | if (chip->pdev->device == PCI_DEVICE_ID_JMICRON_JMB38X_MMC || |
417 | chip->pdev->device == PCI_DEVICE_ID_JMICRON_JMB388_ESD) { | 415 | chip->pdev->device == PCI_DEVICE_ID_JMICRON_JMB388_ESD) { |
418 | for (i = 0;i < chip->num_slots;i++) | 416 | for (i = 0; i < chip->num_slots; i++) |
419 | jmicron_enable_mmc(chip->slots[i]->host, 1); | 417 | jmicron_enable_mmc(chip->slots[i]->host, 1); |
420 | } | 418 | } |
421 | 419 | ||
@@ -798,7 +796,7 @@ static struct sdhci_ops sdhci_pci_ops = { | |||
798 | 796 | ||
799 | #ifdef CONFIG_PM | 797 | #ifdef CONFIG_PM |
800 | 798 | ||
801 | static int sdhci_pci_suspend (struct pci_dev *pdev, pm_message_t state) | 799 | static int sdhci_pci_suspend(struct pci_dev *pdev, pm_message_t state) |
802 | { | 800 | { |
803 | struct sdhci_pci_chip *chip; | 801 | struct sdhci_pci_chip *chip; |
804 | struct sdhci_pci_slot *slot; | 802 | struct sdhci_pci_slot *slot; |
@@ -810,7 +808,7 @@ static int sdhci_pci_suspend (struct pci_dev *pdev, pm_message_t state) | |||
810 | if (!chip) | 808 | if (!chip) |
811 | return 0; | 809 | return 0; |
812 | 810 | ||
813 | for (i = 0;i < chip->num_slots;i++) { | 811 | for (i = 0; i < chip->num_slots; i++) { |
814 | slot = chip->slots[i]; | 812 | slot = chip->slots[i]; |
815 | if (!slot) | 813 | if (!slot) |
816 | continue; | 814 | continue; |
@@ -818,7 +816,7 @@ static int sdhci_pci_suspend (struct pci_dev *pdev, pm_message_t state) | |||
818 | ret = sdhci_suspend_host(slot->host, state); | 816 | ret = sdhci_suspend_host(slot->host, state); |
819 | 817 | ||
820 | if (ret) { | 818 | if (ret) { |
821 | for (i--;i >= 0;i--) | 819 | for (i--; i >= 0; i--) |
822 | sdhci_resume_host(chip->slots[i]->host); | 820 | sdhci_resume_host(chip->slots[i]->host); |
823 | return ret; | 821 | return ret; |
824 | } | 822 | } |
@@ -833,7 +831,7 @@ static int sdhci_pci_suspend (struct pci_dev *pdev, pm_message_t state) | |||
833 | if (chip->fixes && chip->fixes->suspend) { | 831 | if (chip->fixes && chip->fixes->suspend) { |
834 | ret = chip->fixes->suspend(chip, state); | 832 | ret = chip->fixes->suspend(chip, state); |
835 | if (ret) { | 833 | if (ret) { |
836 | for (i = chip->num_slots - 1;i >= 0;i--) | 834 | for (i = chip->num_slots - 1; i >= 0; i--) |
837 | sdhci_resume_host(chip->slots[i]->host); | 835 | sdhci_resume_host(chip->slots[i]->host); |
838 | return ret; | 836 | return ret; |
839 | } | 837 | } |
@@ -855,7 +853,7 @@ static int sdhci_pci_suspend (struct pci_dev *pdev, pm_message_t state) | |||
855 | return 0; | 853 | return 0; |
856 | } | 854 | } |
857 | 855 | ||
858 | static int sdhci_pci_resume (struct pci_dev *pdev) | 856 | static int sdhci_pci_resume(struct pci_dev *pdev) |
859 | { | 857 | { |
860 | struct sdhci_pci_chip *chip; | 858 | struct sdhci_pci_chip *chip; |
861 | struct sdhci_pci_slot *slot; | 859 | struct sdhci_pci_slot *slot; |
@@ -877,7 +875,7 @@ static int sdhci_pci_resume (struct pci_dev *pdev) | |||
877 | return ret; | 875 | return ret; |
878 | } | 876 | } |
879 | 877 | ||
880 | for (i = 0;i < chip->num_slots;i++) { | 878 | for (i = 0; i < chip->num_slots; i++) { |
881 | slot = chip->slots[i]; | 879 | slot = chip->slots[i]; |
882 | if (!slot) | 880 | if (!slot) |
883 | continue; | 881 | continue; |
@@ -1059,7 +1057,7 @@ static int __devinit sdhci_pci_probe(struct pci_dev *pdev, | |||
1059 | } | 1057 | } |
1060 | 1058 | ||
1061 | chip->pdev = pdev; | 1059 | chip->pdev = pdev; |
1062 | chip->fixes = (const struct sdhci_pci_fixes*)ent->driver_data; | 1060 | chip->fixes = (const struct sdhci_pci_fixes *)ent->driver_data; |
1063 | if (chip->fixes) | 1061 | if (chip->fixes) |
1064 | chip->quirks = chip->fixes->quirks; | 1062 | chip->quirks = chip->fixes->quirks; |
1065 | chip->num_slots = slots; | 1063 | chip->num_slots = slots; |
@@ -1074,10 +1072,10 @@ static int __devinit sdhci_pci_probe(struct pci_dev *pdev, | |||
1074 | 1072 | ||
1075 | slots = chip->num_slots; /* Quirk may have changed this */ | 1073 | slots = chip->num_slots; /* Quirk may have changed this */ |
1076 | 1074 | ||
1077 | for (i = 0;i < slots;i++) { | 1075 | for (i = 0; i < slots; i++) { |
1078 | slot = sdhci_pci_probe_slot(pdev, chip, first_bar + i); | 1076 | slot = sdhci_pci_probe_slot(pdev, chip, first_bar + i); |
1079 | if (IS_ERR(slot)) { | 1077 | if (IS_ERR(slot)) { |
1080 | for (i--;i >= 0;i--) | 1078 | for (i--; i >= 0; i--) |
1081 | sdhci_pci_remove_slot(chip->slots[i]); | 1079 | sdhci_pci_remove_slot(chip->slots[i]); |
1082 | ret = PTR_ERR(slot); | 1080 | ret = PTR_ERR(slot); |
1083 | goto free; | 1081 | goto free; |
@@ -1105,7 +1103,7 @@ static void __devexit sdhci_pci_remove(struct pci_dev *pdev) | |||
1105 | chip = pci_get_drvdata(pdev); | 1103 | chip = pci_get_drvdata(pdev); |
1106 | 1104 | ||
1107 | if (chip) { | 1105 | if (chip) { |
1108 | for (i = 0;i < chip->num_slots; i++) | 1106 | for (i = 0; i < chip->num_slots; i++) |
1109 | sdhci_pci_remove_slot(chip->slots[i]); | 1107 | sdhci_pci_remove_slot(chip->slots[i]); |
1110 | 1108 | ||
1111 | pci_set_drvdata(pdev, NULL); | 1109 | pci_set_drvdata(pdev, NULL); |
@@ -1116,9 +1114,9 @@ static void __devexit sdhci_pci_remove(struct pci_dev *pdev) | |||
1116 | } | 1114 | } |
1117 | 1115 | ||
1118 | static struct pci_driver sdhci_driver = { | 1116 | static struct pci_driver sdhci_driver = { |
1119 | .name = "sdhci-pci", | 1117 | .name = "sdhci-pci", |
1120 | .id_table = pci_ids, | 1118 | .id_table = pci_ids, |
1121 | .probe = sdhci_pci_probe, | 1119 | .probe = sdhci_pci_probe, |
1122 | .remove = __devexit_p(sdhci_pci_remove), | 1120 | .remove = __devexit_p(sdhci_pci_remove), |
1123 | .suspend = sdhci_pci_suspend, | 1121 | .suspend = sdhci_pci_suspend, |
1124 | .resume = sdhci_pci_resume, | 1122 | .resume = sdhci_pci_resume, |