aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2011-05-17 20:06:35 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-06-01 15:10:55 -0400
commitaa63418aa72e4468838eea457a123057b1c7cd11 (patch)
treefdc8a914babf820bc31d323b25a4cf3dce88cc28 /drivers/net/wireless
parent11ad2f52826ac6d58d6780d3d8a3e098c88d9142 (diff)
b43: rename ssb_device variable in ssb specific functions
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/b43/main.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index eb4159686985..1e81a0d6f543 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -4982,26 +4982,27 @@ static struct b43_wl *b43_wireless_init(struct ssb_device *dev)
4982 return wl; 4982 return wl;
4983} 4983}
4984 4984
4985static int b43_ssb_probe(struct ssb_device *dev, const struct ssb_device_id *id) 4985static
4986int b43_ssb_probe(struct ssb_device *sdev, const struct ssb_device_id *id)
4986{ 4987{
4987 struct b43_wl *wl; 4988 struct b43_wl *wl;
4988 int err; 4989 int err;
4989 int first = 0; 4990 int first = 0;
4990 4991
4991 wl = ssb_get_devtypedata(dev); 4992 wl = ssb_get_devtypedata(sdev);
4992 if (!wl) { 4993 if (!wl) {
4993 /* Probing the first core. Must setup common struct b43_wl */ 4994 /* Probing the first core. Must setup common struct b43_wl */
4994 first = 1; 4995 first = 1;
4995 b43_sprom_fixup(dev->bus); 4996 b43_sprom_fixup(sdev->bus);
4996 wl = b43_wireless_init(dev); 4997 wl = b43_wireless_init(sdev);
4997 if (IS_ERR(wl)) { 4998 if (IS_ERR(wl)) {
4998 err = PTR_ERR(wl); 4999 err = PTR_ERR(wl);
4999 goto out; 5000 goto out;
5000 } 5001 }
5001 ssb_set_devtypedata(dev, wl); 5002 ssb_set_devtypedata(sdev, wl);
5002 B43_WARN_ON(ssb_get_devtypedata(dev) != wl); 5003 B43_WARN_ON(ssb_get_devtypedata(sdev) != wl);
5003 } 5004 }
5004 err = b43_one_core_attach(dev, wl); 5005 err = b43_one_core_attach(sdev, wl);
5005 if (err) 5006 if (err)
5006 goto err_wireless_exit; 5007 goto err_wireless_exit;
5007 5008
@@ -5016,17 +5017,17 @@ static int b43_ssb_probe(struct ssb_device *dev, const struct ssb_device_id *id)
5016 return err; 5017 return err;
5017 5018
5018 err_one_core_detach: 5019 err_one_core_detach:
5019 b43_one_core_detach(dev); 5020 b43_one_core_detach(sdev);
5020 err_wireless_exit: 5021 err_wireless_exit:
5021 if (first) 5022 if (first)
5022 b43_wireless_exit(dev, wl); 5023 b43_wireless_exit(sdev, wl);
5023 return err; 5024 return err;
5024} 5025}
5025 5026
5026static void b43_ssb_remove(struct ssb_device *dev) 5027static void b43_ssb_remove(struct ssb_device *sdev)
5027{ 5028{
5028 struct b43_wl *wl = ssb_get_devtypedata(dev); 5029 struct b43_wl *wl = ssb_get_devtypedata(sdev);
5029 struct b43_wldev *wldev = ssb_get_drvdata(dev); 5030 struct b43_wldev *wldev = ssb_get_drvdata(sdev);
5030 5031
5031 /* We must cancel any work here before unregistering from ieee80211, 5032 /* We must cancel any work here before unregistering from ieee80211,
5032 * as the ieee80211 unreg will destroy the workqueue. */ 5033 * as the ieee80211 unreg will destroy the workqueue. */
@@ -5042,14 +5043,14 @@ static void b43_ssb_remove(struct ssb_device *dev)
5042 ieee80211_unregister_hw(wl->hw); 5043 ieee80211_unregister_hw(wl->hw);
5043 } 5044 }
5044 5045
5045 b43_one_core_detach(dev); 5046 b43_one_core_detach(sdev);
5046 5047
5047 if (list_empty(&wl->devlist)) { 5048 if (list_empty(&wl->devlist)) {
5048 b43_leds_unregister(wl); 5049 b43_leds_unregister(wl);
5049 /* Last core on the chip unregistered. 5050 /* Last core on the chip unregistered.
5050 * We can destroy common struct b43_wl. 5051 * We can destroy common struct b43_wl.
5051 */ 5052 */
5052 b43_wireless_exit(dev, wl); 5053 b43_wireless_exit(sdev, wl);
5053 } 5054 }
5054} 5055}
5055 5056