mac802154: constify ieee802154_llsec_ops structure
authorJulia Lawall <Julia.Lawall@lip6.fr>
Wed, 23 Dec 2015 21:36:32 +0000 (22:36 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 4 Jan 2016 19:40:41 +0000 (20:40 +0100)
The ieee802154_llsec_ops structure is never modified, so declare it as
const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
include/net/ieee802154_netdev.h
net/mac802154/mac_cmd.c

index a62a051..c4b3160 100644 (file)
@@ -337,7 +337,7 @@ struct ieee802154_mlme_ops {
        void (*get_mac_params)(struct net_device *dev,
                               struct ieee802154_mac_params *params);
 
-       struct ieee802154_llsec_ops *llsec;
+       const struct ieee802154_llsec_ops *llsec;
 };
 
 static inline struct ieee802154_mlme_ops *
index 8606da4..3db1634 100644 (file)
@@ -126,7 +126,7 @@ static void mac802154_get_mac_params(struct net_device *dev,
        params->lbt = wpan_dev->lbt;
 }
 
-static struct ieee802154_llsec_ops mac802154_llsec_ops = {
+static const struct ieee802154_llsec_ops mac802154_llsec_ops = {
        .get_params = mac802154_get_params,
        .set_params = mac802154_set_params,
        .add_key = mac802154_add_key,