Commit d331eb51 authored by Larry Finger's avatar Larry Finger Committed by John W. Linville

rt2800pci: Fix compiler error on PowerPC

Using gcc 4.4.5 on a Powerbook G4 with a PPC cpu, a complicated
if statement results in incorrect flow, whereas the equivalent switch
statement works correctly.
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Cc: stable <stable@kernel.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 7cabafce
...@@ -3870,19 +3870,23 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev) ...@@ -3870,19 +3870,23 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
return -ENODEV; return -ENODEV;
} }
if (!rt2x00_rf(rt2x00dev, RF2820) && switch (rt2x00dev->chip.rf) {
!rt2x00_rf(rt2x00dev, RF2850) && case RF2820:
!rt2x00_rf(rt2x00dev, RF2720) && case RF2850:
!rt2x00_rf(rt2x00dev, RF2750) && case RF2720:
!rt2x00_rf(rt2x00dev, RF3020) && case RF2750:
!rt2x00_rf(rt2x00dev, RF2020) && case RF3020:
!rt2x00_rf(rt2x00dev, RF3021) && case RF2020:
!rt2x00_rf(rt2x00dev, RF3022) && case RF3021:
!rt2x00_rf(rt2x00dev, RF3052) && case RF3022:
!rt2x00_rf(rt2x00dev, RF3320) && case RF3052:
!rt2x00_rf(rt2x00dev, RF5370) && case RF3320:
!rt2x00_rf(rt2x00dev, RF5390)) { case RF5370:
ERROR(rt2x00dev, "Invalid RF chipset detected.\n"); case RF5390:
break;
default:
ERROR(rt2x00dev, "Invalid RF chipset 0x%x detected.\n",
rt2x00dev->chip.rf);
return -ENODEV; return -ENODEV;
} }
......
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