aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2011-09-14 17:50:22 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-09-16 15:32:09 -0400
commitd331eb51e4d4190b2178c30fcafea54a94a577e8 (patch)
treed3e1ba8c7be425d6de66a747c9212f0aa4bf77c4
parent7cabafcea793c003503a118da58da358b0692930 (diff)
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: Larry Finger <Larry.Finger@lwfinger.net> Cc: stable <stable@kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/rt2x00/rt2800lib.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index ef67f6786a84..23568af4941d 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -3870,19 +3870,23 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
3870 return -ENODEV; 3870 return -ENODEV;
3871 } 3871 }
3872 3872
3873 if (!rt2x00_rf(rt2x00dev, RF2820) && 3873 switch (rt2x00dev->chip.rf) {
3874 !rt2x00_rf(rt2x00dev, RF2850) && 3874 case RF2820:
3875 !rt2x00_rf(rt2x00dev, RF2720) && 3875 case RF2850:
3876 !rt2x00_rf(rt2x00dev, RF2750) && 3876 case RF2720:
3877 !rt2x00_rf(rt2x00dev, RF3020) && 3877 case RF2750:
3878 !rt2x00_rf(rt2x00dev, RF2020) && 3878 case RF3020:
3879 !rt2x00_rf(rt2x00dev, RF3021) && 3879 case RF2020:
3880 !rt2x00_rf(rt2x00dev, RF3022) && 3880 case RF3021:
3881 !rt2x00_rf(rt2x00dev, RF3052) && 3881 case RF3022:
3882 !rt2x00_rf(rt2x00dev, RF3320) && 3882 case RF3052:
3883 !rt2x00_rf(rt2x00dev, RF5370) && 3883 case RF3320:
3884 !rt2x00_rf(rt2x00dev, RF5390)) { 3884 case RF5370:
3885 ERROR(rt2x00dev, "Invalid RF chipset detected.\n"); 3885 case RF5390:
3886 break;
3887 default:
3888 ERROR(rt2x00dev, "Invalid RF chipset 0x%x detected.\n",
3889 rt2x00dev->chip.rf);
3886 return -ENODEV; 3890 return -ENODEV;
3887 } 3891 }
3888 3892