diff options
author | Brian Cavagnolo <brian@cozybit.com> | 2010-11-12 20:23:53 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-16 16:37:03 -0500 |
commit | d1f9e41d1d739cd4393840d35e7554f4a439a4f1 (patch) | |
tree | 6e6368a452109bf5bb65fdfd7056947e62e44d5b /drivers/net/wireless/mwl8k.c | |
parent | 99020471001dbbd6edf61f105368cb6667cc683d (diff) |
mwl8k: use const struct fw pointers throughout
This eliminates compiler warnings by doing things how the
firmware class expects.
Signed-off-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwl8k.c')
-rw-r--r-- | 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 081bb6c848d9..9ecf8407cb1b 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
@@ -144,8 +144,8 @@ struct mwl8k_priv { | |||
144 | void __iomem *regs; | 144 | void __iomem *regs; |
145 | 145 | ||
146 | /* firmware */ | 146 | /* firmware */ |
147 | struct firmware *fw_helper; | 147 | const struct firmware *fw_helper; |
148 | struct firmware *fw_ucode; | 148 | const struct firmware *fw_ucode; |
149 | 149 | ||
150 | /* hardware/firmware parameters */ | 150 | /* hardware/firmware parameters */ |
151 | bool ap_fw; | 151 | bool ap_fw; |
@@ -395,7 +395,7 @@ static void mwl8k_hw_reset(struct mwl8k_priv *priv) | |||
395 | } | 395 | } |
396 | 396 | ||
397 | /* Release fw image */ | 397 | /* Release fw image */ |
398 | static void mwl8k_release_fw(struct firmware **fw) | 398 | static void mwl8k_release_fw(const struct firmware **fw) |
399 | { | 399 | { |
400 | if (*fw == NULL) | 400 | if (*fw == NULL) |
401 | return; | 401 | return; |
@@ -420,7 +420,7 @@ enum { | |||
420 | 420 | ||
421 | /* Request fw image */ | 421 | /* Request fw image */ |
422 | static int mwl8k_request_fw(struct mwl8k_priv *priv, | 422 | static int mwl8k_request_fw(struct mwl8k_priv *priv, |
423 | const char *fname, struct firmware **fw, | 423 | const char *fname, const struct firmware **fw, |
424 | bool nowait) | 424 | bool nowait) |
425 | { | 425 | { |
426 | /* release current image */ | 426 | /* release current image */ |
@@ -432,8 +432,7 @@ static int mwl8k_request_fw(struct mwl8k_priv *priv, | |||
432 | &priv->pdev->dev, GFP_KERNEL, | 432 | &priv->pdev->dev, GFP_KERNEL, |
433 | priv, mwl8k_fw_state_machine); | 433 | priv, mwl8k_fw_state_machine); |
434 | else | 434 | else |
435 | return request_firmware((const struct firmware **)fw, | 435 | return request_firmware(fw, fname, &priv->pdev->dev); |
436 | fname, &priv->pdev->dev); | ||
437 | } | 436 | } |
438 | 437 | ||
439 | static int mwl8k_request_firmware(struct mwl8k_priv *priv, char *fw_image, | 438 | 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, | |||
632 | static int mwl8k_load_firmware(struct ieee80211_hw *hw) | 631 | static int mwl8k_load_firmware(struct ieee80211_hw *hw) |
633 | { | 632 | { |
634 | struct mwl8k_priv *priv = hw->priv; | 633 | struct mwl8k_priv *priv = hw->priv; |
635 | struct firmware *fw = priv->fw_ucode; | 634 | const struct firmware *fw = priv->fw_ucode; |
636 | int rc; | 635 | int rc; |
637 | int loops; | 636 | int loops; |
638 | 637 | ||
639 | if (!memcmp(fw->data, "\x01\x00\x00\x00", 4)) { | 638 | if (!memcmp(fw->data, "\x01\x00\x00\x00", 4)) { |
640 | struct firmware *helper = priv->fw_helper; | 639 | const struct firmware *helper = priv->fw_helper; |
641 | 640 | ||
642 | if (helper == NULL) { | 641 | if (helper == NULL) { |
643 | printk(KERN_ERR "%s: helper image needed but none " | 642 | printk(KERN_ERR "%s: helper image needed but none " |