summaryrefslogtreecommitdiff
path: root/board/eNET/eNET_pci.c
diff options
context:
space:
mode:
authorGraeme Russ <graeme.russ@gmail.com>2011-11-08 02:33:16 +0000
committerGraeme Russ <graeme.russ@gmail.com>2011-11-29 21:04:00 +1100
commit63a90bfb7e2794489acc708835958e1e4a6ea1d6 (patch)
treed52afb2035192d109e7557d93335d0bb8c044223 /board/eNET/eNET_pci.c
parent83088afbba0c142fda5313866abd1e679d0f9e78 (diff)
downloadu-boot-imx-63a90bfb7e2794489acc708835958e1e4a6ea1d6.zip
u-boot-imx-63a90bfb7e2794489acc708835958e1e4a6ea1d6.tar.gz
u-boot-imx-63a90bfb7e2794489acc708835958e1e4a6ea1d6.tar.bz2
cosmetic: checkpatch cleanup of board/eNET/*.c
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
Diffstat (limited to 'board/eNET/eNET_pci.c')
-rw-r--r--board/eNET/eNET_pci.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/board/eNET/eNET_pci.c b/board/eNET/eNET_pci.c
index 29d13d2..5af4ef7 100644
--- a/board/eNET/eNET_pci.c
+++ b/board/eNET/eNET_pci.c
@@ -38,7 +38,7 @@ static void pci_enet_fixup_irq(struct pci_controller *hose, pci_dev_t dev)
CONFIG_SYS_THIRD_PCI_IRQ,
CONFIG_SYS_FORTH_PCI_IRQ
};
- static int next_irq_index=0;
+ static int next_irq_index;
uchar tmp_pin;
int pin;
@@ -47,9 +47,8 @@ static void pci_enet_fixup_irq(struct pci_controller *hose, pci_dev_t dev)
pin = tmp_pin;
pin -= 1; /* PCI config space use 1-based numbering */
- if (pin == -1) {
+ if (pin == -1)
return; /* device use no irq */
- }
/* map device number + pin to a pin on the sc520 */
switch (PCI_DEV(dev)) {
@@ -69,19 +68,19 @@ static void pci_enet_fixup_irq(struct pci_controller *hose, pci_dev_t dev)
if (sc520_pci_ints[pin] == -1) {
/* re-route one interrupt for us */
- if (next_irq_index > 3) {
+ if (next_irq_index > 3)
return;
- }
- if (pci_sc520_set_irq(pin, irq_list[next_irq_index])) {
+
+ if (pci_sc520_set_irq(pin, irq_list[next_irq_index]))
return;
- }
+
next_irq_index++;
}
- if (-1 != sc520_pci_ints[pin]) {
- pci_hose_write_config_byte(hose, dev, PCI_INTERRUPT_LINE,
+ if (-1 != sc520_pci_ints[pin])
+ pci_hose_write_config_byte(hose, dev, PCI_INTERRUPT_LINE,
sc520_pci_ints[pin]);
- }
+
printf("fixup_irq: device %d pin %c irq %d\n",
PCI_DEV(dev), 'A' + pin, sc520_pci_ints[pin]);
}