From: Eugene Krasnikov Date: Mon, 18 Mar 2013 16:46:38 +0000 (+0100) Subject: Change save_cmnos_printf type to function pointer X-Git-Tag: 1.3.2~6^2~1 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=d70fa1b4a01ec253b800e9a32ee2c8a3c776ea9b;p=open-ath9k-htc-firmware.git Change save_cmnos_printf type to function pointer save_cmnos_printf is always used as a function pointer and never as integer Signed-off-by: Eugene Krasnikov --- diff --git a/target_firmware/magpie_fw_dev/target/inc/k2/athos_api.h b/target_firmware/magpie_fw_dev/target/inc/k2/athos_api.h index ed3ff66..01f75aa 100755 --- a/target_firmware/magpie_fw_dev/target/inc/k2/athos_api.h +++ b/target_firmware/magpie_fw_dev/target/inc/k2/athos_api.h @@ -56,7 +56,7 @@ /* ROM Patch API */ /* save the ROM printf function point */ -extern uint32_t save_cmnos_printf; +extern int (* save_cmnos_printf)(const char * fmt, ...); extern unsigned int _data_start_in_rom; extern unsigned int _data_start; diff --git a/target_firmware/magpie_fw_dev/target/init/app_start.c b/target_firmware/magpie_fw_dev/target/init/app_start.c index 64552aa..136f966 100644 --- a/target_firmware/magpie_fw_dev/target/init/app_start.c +++ b/target_firmware/magpie_fw_dev/target/init/app_start.c @@ -128,13 +128,13 @@ void app_start() A_PRINTF(" A_WDT_INIT()\n\r"); #if defined(PROJECT_K2) - save_cmnos_printf = (uint32_t) fw_cmnos_printf; + save_cmnos_printf = fw_cmnos_printf; #endif if( hostif == HIF_USB ) { #if defined(PROJECT_K2) #if MOVE_PRINT_TO_RAM - save_cmnos_printf = (uint32_t) _indir_tbl.cmnos.printf._printf; + save_cmnos_printf = _indir_tbl.cmnos.printf._printf; _indir_tbl.cmnos.printf._printf = fw_cmnos_printf; #endif _indir_tbl.cmnos.usb._usb_fw_task = _fw_usb_fw_task; diff --git a/target_firmware/magpie_fw_dev/target/init/init.c b/target_firmware/magpie_fw_dev/target/init/init.c index b32661e..54885b2 100755 --- a/target_firmware/magpie_fw_dev/target/init/init.c +++ b/target_firmware/magpie_fw_dev/target/init/init.c @@ -60,7 +60,7 @@ uint32_t idle_cnt = 0; #if defined(PROJECT_K2) // save the ROM printf function point -uint32_t save_cmnos_printf; +int (* save_cmnos_printf)(const char * fmt, ...); #endif #define ATH_DATE_STRING __DATE__" "__TIME__