diff options
author | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-01-29 19:21:33 +0000 |
---|---|---|
committer | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-01-29 19:21:33 +0000 |
commit | 9b8e89e6d0c3fa83b749bac6544cc026a73b519b (patch) | |
tree | 7914892675989188ee4196eee913456fd6e6a6f6 /wct4xxp | |
parent | c8f405c4b35d8b3ffd27da446c922b14778171dd (diff) |
Merged revisions 1996 via svnmerge from
https://origsvn.digium.com/svn/zaptel/branches/1.2
........
r1996 | kpfleming | 2007-01-29 13:20:32 -0600 (Mon, 29 Jan 2007) | 2 lines
_really_ fix the non-hotplug firmware case
........
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@1998 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'wct4xxp')
-rw-r--r-- | wct4xxp/base.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/wct4xxp/base.c b/wct4xxp/base.c index 1432493..ae82d71 100644 --- a/wct4xxp/base.c +++ b/wct4xxp/base.c @@ -3102,8 +3102,8 @@ static void t4_vpm450_init(struct t4 *wc) struct firmware embedded_firmware; const struct firmware *firmware = &embedded_firmware; #if !defined(HOTPLUG_FIRMWARE) - extern const u32 *_binary_OCT6114_64D_ima_size; - extern const u32 *_binary_OCT6114_128D_ima_size; + extern void *_binary_OCT6114_64D_ima_size; + extern void *_binary_OCT6114_128D_ima_size; extern u8 _binary_OCT6114_64D_ima_start[]; extern u8 _binary_OCT6114_128D_ima_start[]; #endif @@ -3142,7 +3142,13 @@ static void t4_vpm450_init(struct t4 *wc) } #else embedded_firmware.data = _binary_OCT6114_64D_ima_start; - embedded_firmware.size = *_binary_OCT6114_64D_ima_size; + /* Yes... this is weird. objcopy gives us a symbol containing + the size of the firmware, not a pointer a variable containing + the size. The only way we can get the value of the symbol + is to take its address, so we define it as a pointer and + then cast that value to the proper type. + */ + embedded_firmware.size = (size_t) _binary_OCT6114_64D_ima_size; #endif break; case 128: @@ -3154,7 +3160,13 @@ static void t4_vpm450_init(struct t4 *wc) } #else embedded_firmware.data = _binary_OCT6114_128D_ima_start; - embedded_firmware.size = *_binary_OCT6114_128D_ima_size; + /* Yes... this is weird. objcopy gives us a symbol containing + the size of the firmware, not a pointer a variable containing + the size. The only way we can get the value of the symbol + is to take its address, so we define it as a pointer and + then cast that value to the proper type. + */ + embedded_firmware.size = (size_t) _binary_OCT6114_128D_ima_size; #endif break; default: |