mac80211_hwsim: statically initialize hwsim_radios list
authorJohannes Berg <johannes.berg@intel.com>
Thu, 15 Sep 2016 13:30:03 +0000 (16:30 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 16 Sep 2016 12:49:43 +0000 (14:49 +0200)
There's no need to initialize at runtime, when the static
declaration macro can just be used instead, so do that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/mac80211_hwsim.c

index 8c35ac838fce2125eafb60f34c3a0701c45ff114..431f13b4faf690c885fbd459b257de5d103406a8 100644 (file)
@@ -487,7 +487,7 @@ static const struct ieee80211_iface_combination hwsim_if_comb_p2p_dev[] = {
 };
 
 static spinlock_t hwsim_radio_lock;
-static struct list_head hwsim_radios;
+static LIST_HEAD(hwsim_radios);
 static int hwsim_radio_idx;
 
 static struct platform_driver mac80211_hwsim_driver = {
@@ -3376,7 +3376,6 @@ static int __init init_mac80211_hwsim(void)
                mac80211_hwsim_unassign_vif_chanctx;
 
        spin_lock_init(&hwsim_radio_lock);
-       INIT_LIST_HEAD(&hwsim_radios);
 
        err = register_pernet_device(&hwsim_net_ops);
        if (err)