From 0d866f8cd830f0ec6e84d7b284f15d2a2b485888 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Tue, 18 Feb 2020 11:20:30 +0530 Subject: soc/intel/common/block/lpc: Drop unnecessary helper function This patch removes unnecessary helper function pch_lpc_interrupt_init() and directly uses soc_pch_pirq_init() function to avoid redundant device NULL check. TEST=Able to build and boot CML platform. Change-Id: I3d11afb7e98f9b7f84beb2fdf308bbffeb3bbff7 Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/coreboot/+/38952 Reviewed-by: Werner Zeh Reviewed-by: Angel Pons Reviewed-by: Paul Menzel Reviewed-by: Nico Huber Reviewed-by: Aamir Bohra Tested-by: build bot (Jenkins) --- src/soc/intel/common/block/lpc/lpc_lib.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'src/soc/intel') diff --git a/src/soc/intel/common/block/lpc/lpc_lib.c b/src/soc/intel/common/block/lpc/lpc_lib.c index 3ad2176c11..5b30a8121b 100644 --- a/src/soc/intel/common/block/lpc/lpc_lib.c +++ b/src/soc/intel/common/block/lpc/lpc_lib.c @@ -270,17 +270,6 @@ static void lpc_set_gen_decode_range( gen_io_dec[i]); } -static void pch_lpc_interrupt_init(void) -{ - const struct device *dev; - - dev = pcidev_on_root(PCH_DEV_SLOT_LPC, 0); - if (!dev) - return; - - soc_pch_pirq_init(dev); -} - void pch_enable_lpc(void) { /* Lookup device tree in romstage */ @@ -295,7 +284,7 @@ void pch_enable_lpc(void) lpc_set_gen_decode_range(gen_io_dec); soc_setup_dmi_pcr_io_dec(gen_io_dec); if (ENV_PAYLOAD_LOADER) - pch_lpc_interrupt_init(); + soc_pch_pirq_init(dev); } void lpc_enable_pci_clk_cntl(void) -- cgit v1.2.3