From: Brian Cavagnolo <brian@cozybit.com>
To: linux-wireless@vger.kernel.org
Cc: buytenh@wantstofly.org, Brian Cavagnolo <brian@cozybit.com>
Subject: [PATCH V2 7/7] mwl8k: use const struct fw pointers throughout
Date: Fri, 12 Nov 2010 17:23:53 -0800 [thread overview]
Message-ID: <1289611433-5119-8-git-send-email-brian@cozybit.com> (raw)
In-Reply-To: <1288659351-22313-1-git-send-email-brian@cozybit.com>
This eliminates compiler warnings by doing things how the
firmware class expects.
Signed-off-by: Brian Cavagnolo <brian@cozybit.com>
---
drivers/net/wireless/mwl8k.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 081bb6c..9ecf840 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -144,8 +144,8 @@ struct mwl8k_priv {
void __iomem *regs;
/* firmware */
- struct firmware *fw_helper;
- struct firmware *fw_ucode;
+ const struct firmware *fw_helper;
+ const struct firmware *fw_ucode;
/* hardware/firmware parameters */
bool ap_fw;
@@ -395,7 +395,7 @@ static void mwl8k_hw_reset(struct mwl8k_priv *priv)
}
/* Release fw image */
-static void mwl8k_release_fw(struct firmware **fw)
+static void mwl8k_release_fw(const struct firmware **fw)
{
if (*fw == NULL)
return;
@@ -420,7 +420,7 @@ enum {
/* Request fw image */
static int mwl8k_request_fw(struct mwl8k_priv *priv,
- const char *fname, struct firmware **fw,
+ const char *fname, const struct firmware **fw,
bool nowait)
{
/* release current image */
@@ -432,8 +432,7 @@ static int mwl8k_request_fw(struct mwl8k_priv *priv,
&priv->pdev->dev, GFP_KERNEL,
priv, mwl8k_fw_state_machine);
else
- return request_firmware((const struct firmware **)fw,
- fname, &priv->pdev->dev);
+ return request_firmware(fw, fname, &priv->pdev->dev);
}
static int mwl8k_request_firmware(struct mwl8k_priv *priv, char *fw_image,
@@ -632,12 +631,12 @@ static int mwl8k_feed_fw_image(struct mwl8k_priv *priv,
static int mwl8k_load_firmware(struct ieee80211_hw *hw)
{
struct mwl8k_priv *priv = hw->priv;
- struct firmware *fw = priv->fw_ucode;
+ const struct firmware *fw = priv->fw_ucode;
int rc;
int loops;
if (!memcmp(fw->data, "\x01\x00\x00\x00", 4)) {
- struct firmware *helper = priv->fw_helper;
+ const struct firmware *helper = priv->fw_helper;
if (helper == NULL) {
printk(KERN_ERR "%s: helper image needed but none "
--
1.7.1.1
prev parent reply other threads:[~2010-11-13 1:24 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-02 0:55 [PATCH 1/7] mwl8k: add firmware files for 8366 Brian Cavagnolo
2010-11-02 0:55 ` [PATCH 2/7] mwl8k: rf_tx_power cmd deprecated for AP firmware Brian Cavagnolo
2010-11-02 8:32 ` Lennert Buytenhek
2010-11-02 0:55 ` [PATCH 3/7] mwl8k: allow for padding in AP transmit descriptor Brian Cavagnolo
2010-11-02 8:53 ` Lennert Buytenhek
2010-11-02 0:55 ` [PATCH 4/7] mwl8k: force AP mode to use non-AMPDU frames Brian Cavagnolo
2010-11-02 8:57 ` Lennert Buytenhek
2010-11-02 0:55 ` [PATCH 5/7] mwl8k: factor out firmware loading and hw init code Brian Cavagnolo
2010-11-02 9:01 ` Lennert Buytenhek
2010-11-02 0:55 ` [PATCH 6/7] mwl8k: choose proper firmware image as directed by user Brian Cavagnolo
2010-11-02 8:30 ` Lennert Buytenhek
2010-11-04 0:19 ` Brian Cavagnolo
2010-11-02 0:55 ` [PATCH 7/7] mac80211: unset SDATA_STATE_OFFCHANNEL when cancelling a scan Brian Cavagnolo
2010-11-02 8:31 ` Lennert Buytenhek
2010-11-04 0:20 ` Brian Cavagnolo
2010-11-02 8:22 ` [PATCH 1/7] mwl8k: add firmware files for 8366 Lennert Buytenhek
2010-11-04 0:19 ` Brian Cavagnolo
2010-11-04 15:36 ` Johannes Berg
2010-11-04 20:53 ` Brian Cavagnolo
2010-11-05 0:15 ` Lennert Buytenhek
2010-11-13 1:23 ` [PATCH V2 0/6] mwl8k: add initial support for AP firmware on 8366 Brian Cavagnolo
2010-11-13 1:23 ` [PATCH V2 1/7] mwl8k: revert unnecessary modification of tx descriptor Brian Cavagnolo
2010-11-13 1:23 ` [PATCH V2 2/7] mwl8k: rf_tx_power cmd not supported by AP firmware APIv1 Brian Cavagnolo
2010-11-13 1:23 ` [PATCH V2 3/7] mwl8k: factor out firmware loading and hw init code Brian Cavagnolo
2010-11-13 1:25 ` Brian Cavagnolo
2010-11-13 1:23 ` [PATCH V2 4/7] mwl8k: choose proper firmware image as directed by user Brian Cavagnolo
2010-11-13 1:25 ` Brian Cavagnolo
2010-11-13 1:23 ` [PATCH V2 5/7] mwl8k: add API version checking for AP firmware Brian Cavagnolo
2010-11-13 1:23 ` [PATCH V2 6/7] mwl8k: make initial firmware load asynchronous Brian Cavagnolo
2010-11-13 1:23 ` Brian Cavagnolo [this message]
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=1289611433-5119-8-git-send-email-brian@cozybit.com \
--to=brian@cozybit.com \
--cc=buytenh@wantstofly.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).