]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
mac802154: declare struct ieee802154_ops as const
authorAlexander Aring <alex.aring@gmail.com>
Tue, 28 Oct 2014 17:21:18 +0000 (18:21 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 28 Oct 2014 22:19:07 +0000 (23:19 +0100)
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>
drivers/net/ieee802154/at86rf230.c
drivers/net/ieee802154/cc2520.c
drivers/net/ieee802154/fakelb.c
drivers/net/ieee802154/mrf24j40.c
include/net/mac802154.h
net/mac802154/ieee802154_i.h
net/mac802154/main.c

index a1558385bac9519bb58cee706705217f229f9efd..662efd3e07b9680a552ed621b08a04a1e1318b88 100644 (file)
@@ -1214,7 +1214,7 @@ at86rf230_set_frame_retries(struct ieee802154_hw *hw, s8 retries)
        return rc;
 }
 
-static struct ieee802154_ops at86rf230_ops = {
+static const struct ieee802154_ops at86rf230_ops = {
        .owner = THIS_MODULE,
        .xmit_async = at86rf230_xmit,
        .ed = at86rf230_ed,
index a31b5b62a353a4bbcefe1f310f880b19d75a499e..b479c9d560f827a28756cbc05c426c9ef33ba3d3 100644 (file)
@@ -631,7 +631,7 @@ cc2520_filter(struct ieee802154_hw *hw,
        return 0;
 }
 
-static struct ieee802154_ops cc2520_ops = {
+static const struct ieee802154_ops cc2520_ops = {
        .owner = THIS_MODULE,
        .start = cc2520_start,
        .stop = cc2520_stop,
index db0703f0fa4113dfbf93ca3701622f61ef8670e5..2a97cbb3aa01c1877a0e2a02081c9a1a68984ff6 100644 (file)
@@ -129,7 +129,7 @@ fakelb_hw_stop(struct ieee802154_hw *hw) {
        spin_unlock(&priv->lock);
 }
 
-static struct ieee802154_ops fakelb_ops = {
+static const struct ieee802154_ops fakelb_ops = {
        .owner = THIS_MODULE,
        .xmit_sync = fakelb_hw_xmit,
        .ed = fakelb_hw_ed,
index 7abb237cb98954e93542454122101c7277d225d2..f19cf588de2e94d62902077f1972d3513b3fe271 100644 (file)
@@ -579,7 +579,7 @@ out:
        return ret;
 }
 
-static struct ieee802154_ops mrf24j40_ops = {
+static const struct ieee802154_ops mrf24j40_ops = {
        .owner = THIS_MODULE,
        .xmit_sync = mrf24j40_tx,
        .ed = mrf24j40_ed,
index 4c4642ef244f6f4fb5a98eab851ccc8aa42e1f76..0ea44cda2920248eed91d32878ce752b0d0c6cbd 100644 (file)
@@ -197,7 +197,7 @@ struct ieee802154_ops {
 
 /* Basic interface to register ieee802154 hwice */
 struct ieee802154_hw *
-ieee802154_alloc_hw(size_t priv_data_len, struct ieee802154_ops *ops);
+ieee802154_alloc_hw(size_t priv_data_len, const struct ieee802154_ops *ops);
 void ieee802154_free_hw(struct ieee802154_hw *hw);
 int ieee802154_register_hw(struct ieee802154_hw *hw);
 void ieee802154_unregister_hw(struct ieee802154_hw *hw);
index 4408c463af3501c978a50c1b10da3c1e73ced195..a379b971b13c98a1394cf33eff592944930014c6 100644 (file)
@@ -28,7 +28,7 @@
 /* mac802154 device private data */
 struct ieee802154_local {
        struct ieee802154_hw hw;
-       struct ieee802154_ops *ops;
+       const struct ieee802154_ops *ops;
 
        /* ieee802154 phy */
        struct wpan_phy *phy;
index 2c6d7725982292a98d2e995ea369da4771b0237b..632707bc47b9f2b10c1c0e2985715bdf2693bb49 100644 (file)
@@ -187,7 +187,7 @@ static void ieee802154_tasklet_handler(unsigned long data)
 }
 
 struct ieee802154_hw *
-ieee802154_alloc_hw(size_t priv_data_len, struct ieee802154_ops *ops)
+ieee802154_alloc_hw(size_t priv_data_len, const struct ieee802154_ops *ops)
 {
        struct wpan_phy *phy;
        struct ieee802154_local *local;