]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
rt2800: cleanup rt2800_init_rfcsr
authorStanislaw Gruszka <stf_xl@wp.pl>
Wed, 17 Apr 2013 12:08:20 +0000 (14:08 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 22 Apr 2013 19:20:19 +0000 (15:20 -0400)
This procedure is simple switch now and return no error any longer.

Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2800lib.c

index ca587baa9e2de6e41345acfa736afbeaca2475f6..211c9bc0c21200b0a4e0830f353810e460781ede 100644 (file)
@@ -5120,25 +5120,11 @@ static void rt2800_init_rfcsr_5592(struct rt2x00_dev *rt2x00dev)
        rt2800_led_open_drain_enable(rt2x00dev);
 }
 
-static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
+static void rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
 {
-       if (!rt2x00_rt(rt2x00dev, RT3070) &&
-           !rt2x00_rt(rt2x00dev, RT3071) &&
-           !rt2x00_rt(rt2x00dev, RT3090) &&
-           !rt2x00_rt(rt2x00dev, RT3290) &&
-           !rt2x00_rt(rt2x00dev, RT3352) &&
-           !rt2x00_rt(rt2x00dev, RT3390) &&
-           !rt2x00_rt(rt2x00dev, RT3572) &&
-           !rt2x00_rt(rt2x00dev, RT5390) &&
-           !rt2x00_rt(rt2x00dev, RT5392) &&
-           !rt2x00_rt(rt2x00dev, RT5392) &&
-           !rt2x00_rt(rt2x00dev, RT5592) &&
-           !rt2800_is_305x_soc(rt2x00dev))
-               return 0;
-
        if (rt2800_is_305x_soc(rt2x00dev)) {
                rt2800_init_rfcsr_305x_soc(rt2x00dev);
-               return 0;
+               return;
        }
 
        switch (rt2x00dev->chip.rt) {
@@ -5167,10 +5153,8 @@ static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
                break;
        case RT5592:
                rt2800_init_rfcsr_5592(rt2x00dev);
-               return 0;
+               break;
        }
-
-               return 0;
 }
 
 int rt2800_enable_radio(struct rt2x00_dev *rt2x00dev)
@@ -5196,10 +5180,11 @@ int rt2800_enable_radio(struct rt2x00_dev *rt2x00dev)
        }
        msleep(1);
 
-       if (unlikely(rt2800_init_bbp(rt2x00dev) ||
-                    rt2800_init_rfcsr(rt2x00dev)))
+       if (unlikely(rt2800_init_bbp(rt2x00dev)))
                return -EIO;
 
+       rt2800_init_rfcsr(rt2x00dev);
+
        if (rt2x00_is_usb(rt2x00dev) &&
            (rt2x00_rt(rt2x00dev, RT3070) ||
             rt2x00_rt(rt2x00dev, RT3071) ||