mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
zlib/gunzip: Use WATCHDOG_RESET macro
As usually done in U-Boot, the watchdog_reset code is called via a macro (WATCHDOG_RESET). In zlib.c this was done differently, by using a function pointer which is initialized with WATCHDOG_RESET upon watchdog usage or with NULL otherwise. This patch now uses the plain WATCHDOG_RESET macros to call the function resulting in slightly smaller U-Boot images and simpler code. U-Boot code size reduction: PowerPC board with watchdog support (lwmon5): -> 80 bytes smaller image size PowerPC board without watchdog support (sequoia): -> 112 bytes smaller image size Signed-off-by: Stefan Roese <sr@denx.de> Cc: Detlev Zundel <dzu@denx.de> Cc: Wolfgang Denk <wd@denx.de> Acked-by: Detlev Zundel <dzu@denx.de>
This commit is contained in:
committed by
Wolfgang Denk
parent
6213b8ffa5
commit
f852628638
@@ -96,11 +96,6 @@ int zunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp,
|
||||
|
||||
s.zalloc = zalloc;
|
||||
s.zfree = zfree;
|
||||
#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
|
||||
s.outcb = (cb_func)WATCHDOG_RESET;
|
||||
#else
|
||||
s.outcb = Z_NULL;
|
||||
#endif /* CONFIG_HW_WATCHDOG */
|
||||
|
||||
r = inflateInit2(&s, -MAX_WBITS);
|
||||
if (r != Z_OK) {
|
||||
|
Reference in New Issue
Block a user