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 7391ad1..09a8235 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 b6ef533..a5dbea1 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 88f234c..9511c2b 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