| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- From e6cbd7e05f7c1fe0a737526d20f39b4a52e03ae8 Mon Sep 17 00:00:00 2001
- From: Ivo van Doorn <[email protected]>
- Date: Tue, 17 Mar 2009 14:01:29 +0100
- Subject: [PATCH] rt2x00: Fix compile errors for SoC
- Signed-off-by: Ivo van Doorn <[email protected]>
- ---
- drivers/net/wireless/rt2x00/rt2800pci.c | 37 +++++++++++++++----------------
- 1 files changed, 18 insertions(+), 19 deletions(-)
- --- a/drivers/net/wireless/rt2x00/rt2800pci.c
- +++ b/drivers/net/wireless/rt2x00/rt2800pci.c
- @@ -3186,7 +3186,7 @@ MODULE_LICENSE("GPL");
- #define WSOC_RT_CHIPSET RT3052
- #endif /* CONFIG_RALINK_RT305X */
-
- -static void rt2800soc_free_reg(struct rt2x00_dev *rt2x00dev)
- +static void rt2x00soc_free_reg(struct rt2x00_dev *rt2x00dev)
- {
- kfree(rt2x00dev->rf);
- rt2x00dev->rf = NULL;
- @@ -3195,7 +3195,7 @@ static void rt2800soc_free_reg(struct rt
- rt2x00dev->eeprom = NULL;
- }
-
- -static int rt2800soc_alloc_reg(struct rt2x00_dev *rt2x00dev)
- +static int rt2x00soc_alloc_reg(struct rt2x00_dev *rt2x00dev)
- {
- struct platform_device *pdev = to_platform_device(rt2x00dev->dev);
- struct resource *res;
- @@ -3219,14 +3219,14 @@ static int rt2800soc_alloc_reg(struct rt
-
- exit:
- ERROR_PROBE("Failed to allocate registers.\n");
- - rt2800soc_free_reg(rt2x00dev);
- + rt2x00soc_free_reg(rt2x00dev);
-
- return -ENOMEM;
- }
-
- -static int rt2800soc_probe(struct platform_device *pdev)
- +static int rt2x00soc_probe(struct platform_device *pdev)
- {
- - struct rt2x00_ops *ops = (struct rt2x00_ops *)pdev->driver->p;
- + const struct rt2x00_ops *ops = &rt2800pci_ops;
- struct ieee80211_hw *hw;
- struct rt2x00_dev *rt2x00dev;
- int retval;
- @@ -3248,7 +3248,7 @@ static int rt2800soc_probe(struct platfo
-
- rt2x00_set_chip_rt(rt2x00dev, WSOC_RT_CHIPSET);
-
- - retval = rt2800soc_alloc_reg(rt2x00dev);
- + retval = rt2x00soc_alloc_reg(rt2x00dev);
- if (retval)
- goto exit_free_device;
-
- @@ -3259,7 +3259,7 @@ static int rt2800soc_probe(struct platfo
- return 0;
-
- exit_free_reg:
- - rt2800soc_free_reg(rt2x00dev);
- + rt2x00soc_free_reg(rt2x00dev);
-
- exit_free_device:
- ieee80211_free_hw(hw);
- @@ -3267,7 +3267,7 @@ exit_free_device:
- return retval;
- }
-
- -static int rt2800soc_remove(struct platform_device *pdev)
- +static int rt2x00soc_remove(struct platform_device *pdev)
- {
- struct ieee80211_hw *hw = platform_get_drvdata(pdev);
- struct rt2x00_dev *rt2x00dev = hw->priv;
- @@ -3276,16 +3276,16 @@ static int rt2800soc_remove(struct platf
- * Free all allocated data.
- */
- rt2x00lib_remove_dev(rt2x00dev);
- - rt2800soc_free_reg(rt2x00dev);
- + rt2x00soc_free_reg(rt2x00dev);
- ieee80211_free_hw(hw);
-
- return 0;
- }
-
- #ifdef CONFIG_PM
- -int rt2x00soc_suspend(struct device *dev, pm_message_t state)
- +int rt2x00soc_suspend(struct platform_device *pdev, pm_message_t state)
- {
- - struct ieee80211_hw *hw = dev_get_drvdata(dev);
- + struct ieee80211_hw *hw = platform_get_drvdata(pdev);
- struct rt2x00_dev *rt2x00dev = hw->priv;
- int retval;
-
- @@ -3293,14 +3293,14 @@ int rt2x00soc_suspend(struct device *dev
- if (retval)
- return retval;
-
- - rt2800soc_free_reg(rt2x00dev);
- + rt2x00soc_free_reg(rt2x00dev);
-
- return 0;
- }
-
- -int rt2x00soc_resume(struct device *dev)
- +int rt2x00soc_resume(struct platform_device *pdev)
- {
- - struct ieee80211_hw *hw = dev_get_drvdata(dev);
- + struct ieee80211_hw *hw = platform_get_drvdata(pdev);
- struct rt2x00_dev *rt2x00dev = hw->priv;
- int retval;
-
- @@ -3315,7 +3315,7 @@ int rt2x00soc_resume(struct device *dev)
- return 0;
-
- exit_free_reg:
- - rt2x00pci_free_reg(rt2x00dev);
- + rt2x00soc_free_reg(rt2x00dev);
-
- return retval;
- }
- @@ -3326,10 +3326,9 @@ static struct platform_driver rt2800soc_
- .name = "rt2800_wmac",
- .owner = THIS_MODULE,
- .mod_name = KBUILD_MODNAME,
- - .p = &rt2800pci_ops;
- - }
- - .probe = rt2800soc_probe,
- - .remove = __devexit_p(rt2800soc_remove),
- + },
- + .probe = rt2x00soc_probe,
- + .remove = __devexit_p(rt2x00soc_remove),
- .suspend = rt2x00soc_suspend,
- .resume = rt2x00soc_resume,
- };
|