Skip to content

Commit

Permalink
cfg80211: mark ops as pointer to const
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Kilroy authored and John W. Linville committed May 20, 2009
1 parent c15ff61 commit 3dcf670
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/net/cfg80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion net/wireless/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion net/wireless/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3dcf670

Please sign in to comment.