浏览代码

cfg80211: make device_type const

Instances of struct device_type are never modified, make them const.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg 11 年之前
父节点
当前提交
f1e3d556a0
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      net/wireless/core.c
  2. 1 1
      net/wireless/reg.c

+ 1 - 1
net/wireless/core.c

@@ -737,7 +737,7 @@ void cfg80211_unregister_wdev(struct wireless_dev *wdev)
 }
 EXPORT_SYMBOL(cfg80211_unregister_wdev);
 
-static struct device_type wiphy_type = {
+static const struct device_type wiphy_type = {
 	.name	= "wlan",
 };
 

+ 1 - 1
net/wireless/reg.c

@@ -91,7 +91,7 @@ static struct regulatory_request __rcu *last_request =
 /* To trigger userspace events */
 static struct platform_device *reg_pdev;
 
-static struct device_type reg_device_type = {
+static const struct device_type reg_device_type = {
 	.uevent = reg_device_uevent,
 };