From: Michael Buesch <mb@bu3sch•de>
To: Jiri Benc <jbenc@suse•cz>
Cc: John Linville <linville@tuxdriver•com>, netdev@vger•kernel.org
Subject: [PATCH] d80211: constify ieee80211_ops pointer
Date: Sat, 16 Dec 2006 23:57:03 +0100 [thread overview]
Message-ID: <200612162357.03541.mb@bu3sch.de> (raw)
const-ify the ieee80211_ops pointer to allow
* The compiler to do opimizations
* The drivers to declare this structure const.
Signed-off-by: Michael Buesch <mb@bu3sch•de>
Index: jbenc-dscape/include/net/d80211.h
===================================================================
--- jbenc-dscape.orig/include/net/d80211.h 2006-12-16 23:52:35.000000000 +0100
+++ jbenc-dscape/include/net/d80211.h 2006-12-16 23:53:51.000000000 +0100
@@ -740,7 +740,7 @@ struct ieee80211_ops {
* priv_data_len.
*/
struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
- struct ieee80211_ops *ops);
+ const struct ieee80211_ops *ops);
/* Register hardware device to the IEEE 802.11 code and kernel. Low-level
* drivers must call this function before using any other IEEE 802.11
Index: jbenc-dscape/net/d80211/ieee80211.c
===================================================================
--- jbenc-dscape.orig/net/d80211/ieee80211.c 2006-12-16 23:52:35.000000000 +0100
+++ jbenc-dscape/net/d80211/ieee80211.c 2006-12-16 23:54:19.000000000 +0100
@@ -4392,7 +4392,7 @@ static void rate_control_deinitialize(st
}
struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
- struct ieee80211_ops *ops)
+ const struct ieee80211_ops *ops)
{
struct net_device *mdev;
struct ieee80211_local *local;
Index: jbenc-dscape/net/d80211/ieee80211_i.h
===================================================================
--- jbenc-dscape.orig/net/d80211/ieee80211_i.h 2006-12-16 23:52:35.000000000 +0100
+++ jbenc-dscape/net/d80211/ieee80211_i.h 2006-12-16 23:54:32.000000000 +0100
@@ -333,7 +333,7 @@ struct ieee80211_local {
* it first anyway so they become a no-op */
struct ieee80211_hw hw;
- struct ieee80211_ops *ops;
+ const struct ieee80211_ops *ops;
/* List of registered struct ieee80211_hw_mode */
struct list_head modes_list;
--
Greetings Michael.
reply other threads:[~2006-12-16 22:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200612162357.03541.mb@bu3sch.de \
--to=mb@bu3sch$(echo .)de \
--cc=jbenc@suse$(echo .)cz \
--cc=linville@tuxdriver$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox