1 From e6cbd7e05f7c1fe0a737526d20f39b4a52e03ae8 Mon Sep 17 00:00:00 2001
2 From: Ivo van Doorn <IvDoorn@gmail.com>
3 Date: Tue, 17 Mar 2009 14:01:29 +0100
4 Subject: [PATCH] rt2x00: Fix compile errors for SoC
6 Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
8 drivers/net/wireless/rt2x00/rt2800pci.c | 37 +++++++++++++++----------------
9 1 files changed, 18 insertions(+), 19 deletions(-)
11 --- a/drivers/net/wireless/rt2x00/rt2800pci.c
12 +++ b/drivers/net/wireless/rt2x00/rt2800pci.c
13 @@ -3186,7 +3186,7 @@ MODULE_LICENSE("GPL");
14 #define WSOC_RT_CHIPSET RT3052
15 #endif /* CONFIG_RALINK_RT305X */
17 -static void rt2800soc_free_reg(struct rt2x00_dev *rt2x00dev)
18 +static void rt2x00soc_free_reg(struct rt2x00_dev *rt2x00dev)
22 @@ -3195,7 +3195,7 @@ static void rt2800soc_free_reg(struct rt
23 rt2x00dev->eeprom = NULL;
26 -static int rt2800soc_alloc_reg(struct rt2x00_dev *rt2x00dev)
27 +static int rt2x00soc_alloc_reg(struct rt2x00_dev *rt2x00dev)
29 struct platform_device *pdev = to_platform_device(rt2x00dev->dev);
31 @@ -3219,14 +3219,14 @@ static int rt2800soc_alloc_reg(struct rt
34 ERROR_PROBE("Failed to allocate registers.\n");
35 - rt2800soc_free_reg(rt2x00dev);
36 + rt2x00soc_free_reg(rt2x00dev);
41 -static int rt2800soc_probe(struct platform_device *pdev)
42 +static int rt2x00soc_probe(struct platform_device *pdev)
44 - struct rt2x00_ops *ops = (struct rt2x00_ops *)pdev->driver->p;
45 + const struct rt2x00_ops *ops = &rt2800pci_ops;
46 struct ieee80211_hw *hw;
47 struct rt2x00_dev *rt2x00dev;
49 @@ -3248,7 +3248,7 @@ static int rt2800soc_probe(struct platfo
51 rt2x00_set_chip_rt(rt2x00dev, WSOC_RT_CHIPSET);
53 - retval = rt2800soc_alloc_reg(rt2x00dev);
54 + retval = rt2x00soc_alloc_reg(rt2x00dev);
56 goto exit_free_device;
58 @@ -3259,7 +3259,7 @@ static int rt2800soc_probe(struct platfo
62 - rt2800soc_free_reg(rt2x00dev);
63 + rt2x00soc_free_reg(rt2x00dev);
66 ieee80211_free_hw(hw);
67 @@ -3267,7 +3267,7 @@ exit_free_device:
71 -static int rt2800soc_remove(struct platform_device *pdev)
72 +static int rt2x00soc_remove(struct platform_device *pdev)
74 struct ieee80211_hw *hw = platform_get_drvdata(pdev);
75 struct rt2x00_dev *rt2x00dev = hw->priv;
76 @@ -3276,16 +3276,16 @@ static int rt2800soc_remove(struct platf
77 * Free all allocated data.
79 rt2x00lib_remove_dev(rt2x00dev);
80 - rt2800soc_free_reg(rt2x00dev);
81 + rt2x00soc_free_reg(rt2x00dev);
82 ieee80211_free_hw(hw);
88 -int rt2x00soc_suspend(struct device *dev, pm_message_t state)
89 +int rt2x00soc_suspend(struct platform_device *pdev, pm_message_t state)
91 - struct ieee80211_hw *hw = dev_get_drvdata(dev);
92 + struct ieee80211_hw *hw = platform_get_drvdata(pdev);
93 struct rt2x00_dev *rt2x00dev = hw->priv;
96 @@ -3293,14 +3293,14 @@ int rt2x00soc_suspend(struct device *dev
100 - rt2800soc_free_reg(rt2x00dev);
101 + rt2x00soc_free_reg(rt2x00dev);
106 -int rt2x00soc_resume(struct device *dev)
107 +int rt2x00soc_resume(struct platform_device *pdev)
109 - struct ieee80211_hw *hw = dev_get_drvdata(dev);
110 + struct ieee80211_hw *hw = platform_get_drvdata(pdev);
111 struct rt2x00_dev *rt2x00dev = hw->priv;
114 @@ -3315,7 +3315,7 @@ int rt2x00soc_resume(struct device *dev)
118 - rt2x00pci_free_reg(rt2x00dev);
119 + rt2x00soc_free_reg(rt2x00dev);
123 @@ -3326,10 +3326,9 @@ static struct platform_driver rt2800soc_
124 .name = "rt2800_wmac",
125 .owner = THIS_MODULE,
126 .mod_name = KBUILD_MODNAME,
127 - .p = &rt2800pci_ops;
129 - .probe = rt2800soc_probe,
130 - .remove = __devexit_p(rt2800soc_remove),
132 + .probe = rt2x00soc_probe,
133 + .remove = __devexit_p(rt2x00soc_remove),
134 .suspend = rt2x00soc_suspend,
135 .resume = rt2x00soc_resume,