summaryrefslogtreecommitdiffstats
path: root/board_enable.c
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2011-08-15 19:54:20 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2011-08-15 19:54:20 +0000
commit082c8b559cd9f3262c9af58ac2f17f2cc8a09d8b (patch)
treece63847ee6cc1e63289e3f658a5d57ebd35b3619 /board_enable.c
parent0528b7fefa6daf35365c1dee0d21bc94e8120f78 (diff)
downloadast2050-flashrom-082c8b559cd9f3262c9af58ac2f17f2cc8a09d8b.zip
ast2050-flashrom-082c8b559cd9f3262c9af58ac2f17f2cc8a09d8b.tar.gz
Fixup of r1397
- Mixing uninitialized and initialized local variables leads to confusion. - ft2232_spi error cases should have gotten some error handling, and that's the reason the curly braces were there. - Fixing typos/wording in some places would have been nice given that those places were touched anyway. Corresponding to flashrom svn r1413. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Diffstat (limited to 'board_enable.c')
-rw-r--r--board_enable.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/board_enable.c b/board_enable.c
index aba6f38..b362b54 100644
--- a/board_enable.c
+++ b/board_enable.c
@@ -860,7 +860,7 @@ static int nvidia_mcp_gpio_set(int gpio, int raise)
return -1;
}
- /* First, check the ISA bridge */
+ /* Check for the ISA bridge first. */
dev = pci_dev_find_vendorclass(0x10DE, 0x0601);
switch (dev->device_id) {
case 0x0030: /* CK804 */
@@ -1129,8 +1129,8 @@ static int intel_piix4_gpo_set(unsigned int gpo, int raise)
struct pci_dev *dev;
uint32_t tmp, base;
- /* GPPO {0,8,27,28,30} are always available */
- static const uint32_t nonmuxed_gpos = 0x58000101;
+ /* GPO{0,8,27,28,30} are always available. */
+ static const uint32_t nonmuxed_gpos = 0x58000101;
static const struct {unsigned int reg, mask, value; } piix4_gpo[] = {
{0},
@@ -1179,10 +1179,9 @@ static int intel_piix4_gpo_set(unsigned int gpo, int raise)
}
if ((((1 << gpo) & nonmuxed_gpos) == 0) &&
- (pci_read_word(dev, piix4_gpo[gpo].reg)
- & piix4_gpo[gpo].mask) != piix4_gpo[gpo].value) {
- msg_perr("\nERROR: PIIX4 GPO%d not programmed for output.\n",
- gpo);
+ ((pci_read_word(dev, piix4_gpo[gpo].reg) & piix4_gpo[gpo].mask) !=
+ piix4_gpo[gpo].value)) {
+ msg_perr("\nERROR: PIIX4 GPO%d not programmed for output.\n", gpo);
return -1;
}
OpenPOWER on IntegriCloud