]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/wireless/core.c
net: struct device - replace bus_id with dev_name(), dev_set_name()
[linux-2.6-omap-h63xx.git] / net / wireless / core.c
index 5031db7b275b734b46870089765420c75c136d10..39e3d10fccdef5cf49761227e71868a88b997e79 100644 (file)
@@ -236,8 +236,7 @@ struct wiphy *wiphy_new(struct cfg80211_ops *ops, int sizeof_priv)
        mutex_unlock(&cfg80211_drv_mutex);
 
        /* give it a proper name */
-       snprintf(drv->wiphy.dev.bus_id, BUS_ID_SIZE,
-                PHY_NAME "%d", drv->idx);
+       dev_set_name(&drv->wiphy.dev, PHY_NAME "%d", drv->idx);
 
        mutex_init(&drv->mtx);
        mutex_init(&drv->devlist_mtx);
@@ -301,12 +300,10 @@ int wiphy_register(struct wiphy *wiphy)
        /* check and set up bitrates */
        ieee80211_set_bitrate_flags(wiphy);
 
+       mutex_lock(&cfg80211_drv_mutex);
+
        /* set up regulatory info */
-       mutex_lock(&cfg80211_reg_mutex);
        wiphy_update_regulatory(wiphy, REGDOM_SET_BY_CORE);
-       mutex_unlock(&cfg80211_reg_mutex);
-
-       mutex_lock(&cfg80211_drv_mutex);
 
        res = device_add(&drv->wiphy.dev);
        if (res)