aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mac80211_hwsim.c
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2008-06-16 01:35:10 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-06-26 16:49:14 -0400
commite800f17c6ffe8b0410d8cf060ab204b93e9c73ab (patch)
tree19efa2bd4ecbfacd938e4283571e74f3b6b91b50 /drivers/net/wireless/mac80211_hwsim.c
parentb662348662f9661f9259c7186c1bdb65620045f1 (diff)
wireless: fix fallout from device_create removal
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mac80211_hwsim.c')
-rw-r--r--drivers/net/wireless/mac80211_hwsim.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 8da352ae6825..5d30c57e3969 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -430,15 +430,16 @@ static int __init init_mac80211_hwsim(void)
430 hwsim_radios[i] = hw; 430 hwsim_radios[i] = hw;
431 431
432 data = hw->priv; 432 data = hw->priv;
433 data->dev = device_create(hwsim_class, NULL, 0, "hwsim%d", i); 433 data->dev = device_create_drvdata(hwsim_class, NULL, 0, hw,
434 "hwsim%d", i);
434 if (IS_ERR(data->dev)) { 435 if (IS_ERR(data->dev)) {
435 printk(KERN_DEBUG "mac80211_hwsim: device_create " 436 printk(KERN_DEBUG
437 "mac80211_hwsim: device_create_drvdata "
436 "failed (%ld)\n", PTR_ERR(data->dev)); 438 "failed (%ld)\n", PTR_ERR(data->dev));
437 err = -ENOMEM; 439 err = -ENOMEM;
438 goto failed; 440 goto failed;
439 } 441 }
440 data->dev->driver = &mac80211_hwsim_driver; 442 data->dev->driver = &mac80211_hwsim_driver;
441 dev_set_drvdata(data->dev, hw);
442 443
443 SET_IEEE80211_DEV(hw, data->dev); 444 SET_IEEE80211_DEV(hw, data->dev);
444 addr[3] = i >> 8; 445 addr[3] = i >> 8;