cfg80211: mark ops as pointer to const
authorDavid Kilroy <kilroyd@googlemail.com>
Sat, 16 May 2009 22:13:46 +0000 (23:13 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 20 May 2009 18:46:27 +0000 (14:46 -0400)
This allows drivers to mark their cfg80211_ops tables const.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
include/net/cfg80211.h
net/wireless/core.c
net/wireless/core.h

index 7391ad10c8c023bcf4dc467c6d8193618dde41a7..09a823520e58d323af089b246269e9a4d62e073e 100644 (file)
@@ -1073,7 +1073,7 @@ static inline const char *wiphy_name(struct wiphy *wiphy)
  * The returned pointer must be assigned to each netdev's
  * ieee80211_ptr for proper operation.
  */
-struct wiphy *wiphy_new(struct cfg80211_ops *ops, int sizeof_priv);
+struct wiphy *wiphy_new(const struct cfg80211_ops *ops, int sizeof_priv);
 
 /**
  * wiphy_register - register a wiphy with cfg80211
index b6ef5337c85f52c428bd858d8a76aa8f4069043e..a5dbea1da4761d7bcff50e618b22491f5a6e65d9 100644 (file)
@@ -229,7 +229,7 @@ int cfg80211_dev_rename(struct cfg80211_registered_device *rdev,
 
 /* exported functions */
 
-struct wiphy *wiphy_new(struct cfg80211_ops *ops, int sizeof_priv)
+struct wiphy *wiphy_new(const struct cfg80211_ops *ops, int sizeof_priv)
 {
        static int wiphy_counter;
 
index 88f234c8f6b31d3eb60980ef2e1793fd70b13d6a..9511c2be83d87daa7b9773791506c4e055f29bf5 100644 (file)
@@ -16,7 +16,7 @@
 #include "reg.h"
 
 struct cfg80211_registered_device {
-       struct cfg80211_ops *ops;
+       const struct cfg80211_ops *ops;
        struct list_head list;
        /* we hold this mutex during any call so that
         * we cannot do multiple calls at once, and also