1 --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
2 +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
4 #include <linux/kernel.h>
5 #include <linux/module.h>
6 #include <linux/slab.h>
7 +#include <linux/clk.h>
10 #include "rt2800lib.h"
11 @@ -8481,13 +8482,14 @@ static int rt2800_probe_rt(struct rt2x00
13 int rt2800_probe_clk(struct rt2x00_dev *rt2x00dev)
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);
22 + return PTR_ERR(clk);
24 - spec->clk_is_20mhz = pdata->clk_is_20mhz;
25 + if (clk_get_rate(clk) == 20000000)
26 + spec->clk_is_20mhz = 1;