[PATCH] Fix a const assignment in moxa_load_fw()
From: David Howells
Date: Tue Jul 08 2008 - 11:44:37 EST
Fix an assignment of a const pointer to a non-const pointer in moxa_load_fw().
This was introduced by patch 037182346f0991683cc7320a257c3f6089432cee.
Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
---
drivers/char/moxa.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c
index d57d3a6..e21346d 100644
--- a/drivers/char/moxa.c
+++ b/drivers/char/moxa.c
@@ -721,7 +721,7 @@ static int moxa_load_code(struct moxa_board_conf *brd, const void *ptr,
static int moxa_load_fw(struct moxa_board_conf *brd, const struct firmware *fw)
{
- void *ptr = fw->data;
+ const void *ptr = fw->data;
char rsn[64];
u16 lens[5];
size_t len;
@@ -734,7 +734,7 @@ static int moxa_load_fw(struct moxa_board_conf *brd, const struct firmware *fw)
u8 model; /* C218T=1, C320T=2, CP204=3 */
u8 reserved2[8];
__le16 len[5];
- } *hdr = ptr;
+ } const *hdr = ptr;
BUILD_BUG_ON(ARRAY_SIZE(hdr->len) != ARRAY_SIZE(lens));
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/