]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Fix a const assignment in moxa_load_fw()
authorDavid Howells <dhowells@redhat.com>
Tue, 8 Jul 2008 16:37:15 +0000 (17:37 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Thu, 10 Jul 2008 13:27:18 +0000 (14:27 +0100)
Fix an assignment of a const pointer to a non-const pointer in moxa_load_fw().

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/char/moxa.c

index d57d3a61919b310f22e972e97cf1c8797334db1d..e21346da3101c7c4c3304d5bcb935d0592f37723 100644 (file)
@@ -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));