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