From a031c81f51eae94877a5076cd1a585d3cbf1bb5c Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Mon, 9 Jan 2023 10:43:47 +1100 Subject: parallel: Drop explicit fallback_chip_X boilerplate A NULL func pointer is necessary and sufficient for the condition `NULL func pointer => fallback_chip_X' as to not need this explicit specification. Therefore drop the explicit need to specify these fallback callback function pointer in the par_master struct. This is a reasonable default for every driver in the tree. Furthermore, move the 'fallback_chip_X()' func from the generic programmer.c register logic into its relevant home of parallel.c and make static local to clean up link-time symbol space. This simplifies the code and driver development. Change-Id: If25c0048a07057aa72be6ffa8d8ad7f0a568dcf7 Signed-off-by: Edward O'Callaghan Reviewed-on: https://review.coreboot.org/c/flashrom/+/71745 Reviewed-by: Stefan Reinauer Tested-by: build bot (Jenkins) --- atavia.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'atavia.c') diff --git a/atavia.c b/atavia.c index 8af52d69..f35771a4 100644 --- a/atavia.c +++ b/atavia.c @@ -135,13 +135,7 @@ static uint8_t atavia_chip_readb(const struct flashctx *flash, const chipaddr ad static const struct par_master lpc_master_atavia = { .map_flash_region = atavia_map, .chip_readb = atavia_chip_readb, - .chip_readw = fallback_chip_readw, - .chip_readl = fallback_chip_readl, - .chip_readn = fallback_chip_readn, .chip_writeb = atavia_chip_writeb, - .chip_writew = fallback_chip_writew, - .chip_writel = fallback_chip_writel, - .chip_writen = fallback_chip_writen, }; static int atavia_init(const struct programmer_cfg *cfg) -- cgit v1.2.3