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>
This commit is contained in:
Brian Cavagnolo 2010-11-12 17:23:53 -08:00 committed by John W. Linville
parent 9902047100
commit d1f9e41d1d
1 changed files with 7 additions and 8 deletions

View File

@ -144,8 +144,8 @@ struct mwl8k_priv {
void __iomem *regs; void __iomem *regs;
/* firmware */ /* firmware */
struct firmware *fw_helper; const struct firmware *fw_helper;
struct firmware *fw_ucode; const struct firmware *fw_ucode;
/* hardware/firmware parameters */ /* hardware/firmware parameters */
bool ap_fw; bool ap_fw;
@ -395,7 +395,7 @@ static void mwl8k_hw_reset(struct mwl8k_priv *priv)
} }
/* Release fw image */ /* Release fw image */
static void mwl8k_release_fw(struct firmware **fw) static void mwl8k_release_fw(const struct firmware **fw)
{ {
if (*fw == NULL) if (*fw == NULL)
return; return;
@ -420,7 +420,7 @@ enum {
/* Request fw image */ /* Request fw image */
static int mwl8k_request_fw(struct mwl8k_priv *priv, static int mwl8k_request_fw(struct mwl8k_priv *priv,
const char *fname, struct firmware **fw, const char *fname, const struct firmware **fw,
bool nowait) bool nowait)
{ {
/* release current image */ /* release current image */
@ -432,8 +432,7 @@ static int mwl8k_request_fw(struct mwl8k_priv *priv,
&priv->pdev->dev, GFP_KERNEL, &priv->pdev->dev, GFP_KERNEL,
priv, mwl8k_fw_state_machine); priv, mwl8k_fw_state_machine);
else else
return request_firmware((const struct firmware **)fw, return request_firmware(fw, fname, &priv->pdev->dev);
fname, &priv->pdev->dev);
} }
static int mwl8k_request_firmware(struct mwl8k_priv *priv, char *fw_image, 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) static int mwl8k_load_firmware(struct ieee80211_hw *hw)
{ {
struct mwl8k_priv *priv = hw->priv; struct mwl8k_priv *priv = hw->priv;
struct firmware *fw = priv->fw_ucode; const struct firmware *fw = priv->fw_ucode;
int rc; int rc;
int loops; int loops;
if (!memcmp(fw->data, "\x01\x00\x00\x00", 4)) { 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) { if (helper == NULL) {
printk(KERN_ERR "%s: helper image needed but none " printk(KERN_ERR "%s: helper image needed but none "