aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac802154
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2014-10-28 13:21:18 -0400
committerMarcel Holtmann <marcel@holtmann.org>2014-10-28 18:19:07 -0400
commit16301861004e50be9c47113cceca62f56516a9a2 (patch)
tree775e43ecec473f9d14cc11bd891aa93d2276ca78 /net/mac802154
parent19ec690a431d8ebf3e9d939160dc223ad40d7d63 (diff)
mac802154: declare struct ieee802154_ops as const
The ieee802154_ops structure should be never changed during runtime. This patch declare this structure as const to avoid a runtime change. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Cc: Alan Ott <alan@signal11.us> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/mac802154')
-rw-r--r--net/mac802154/ieee802154_i.h2
-rw-r--r--net/mac802154/main.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/net/mac802154/ieee802154_i.h b/net/mac802154/ieee802154_i.h
index 4408c463af35..a379b971b13c 100644
--- a/net/mac802154/ieee802154_i.h
+++ b/net/mac802154/ieee802154_i.h
@@ -28,7 +28,7 @@
28/* mac802154 device private data */ 28/* mac802154 device private data */
29struct ieee802154_local { 29struct ieee802154_local {
30 struct ieee802154_hw hw; 30 struct ieee802154_hw hw;
31 struct ieee802154_ops *ops; 31 const struct ieee802154_ops *ops;
32 32
33 /* ieee802154 phy */ 33 /* ieee802154 phy */
34 struct wpan_phy *phy; 34 struct wpan_phy *phy;
diff --git a/net/mac802154/main.c b/net/mac802154/main.c
index 2c6d77259822..632707bc47b9 100644
--- a/net/mac802154/main.c
+++ b/net/mac802154/main.c
@@ -187,7 +187,7 @@ static void ieee802154_tasklet_handler(unsigned long data)
187} 187}
188 188
189struct ieee802154_hw * 189struct ieee802154_hw *
190ieee802154_alloc_hw(size_t priv_data_len, struct ieee802154_ops *ops) 190ieee802154_alloc_hw(size_t priv_data_len, const struct ieee802154_ops *ops)
191{ 191{
192 struct wpan_phy *phy; 192 struct wpan_phy *phy;
193 struct ieee802154_local *local; 193 struct ieee802154_local *local;