AA: mac80211: sync with trunk r41113
[12.09/openwrt.git] / package / mac80211 / patches / a10-rt2x00_clk_get_revert.patch
1 --- a/drivers/net/wireless/rt2x00/rt2800lib.c
2 +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
3 @@ -36,7 +36,6 @@
4  #include <linux/kernel.h>
5  #include <linux/module.h>
6  #include <linux/slab.h>
7 -#include <linux/clk.h>
8  #include <linux/of.h>
9  
10  #include "rt2x00.h"
11 @@ -8622,14 +8621,13 @@ static int rt2800_probe_rt(struct rt2x00
12  
13  int rt2800_probe_clk(struct rt2x00_dev *rt2x00dev)
14  {
15 +       struct rt2x00_platform_data *pdata = rt2x00dev->dev->platform_data;
16         struct hw_mode_spec *spec = &rt2x00dev->spec;
17 -       struct clk *clk = clk_get(rt2x00dev->dev, NULL);
18  
19 -       if (IS_ERR(clk))
20 -               return PTR_ERR(clk);
21 +       if (!pdata)
22 +               return -EINVAL;
23  
24 -       if (clk_get_rate(clk) == 20000000)
25 -               spec->clk_is_20mhz = 1;
26 +       spec->clk_is_20mhz = pdata->clk_is_20mhz;
27  
28         return 0;
29  }