From b5a88e9d95369537876bef1e84e591f583bf7d85 Mon Sep 17 00:00:00 2001 From: Muhammad Hazim Izzat Zamri Date: Thu, 13 Mar 2025 19:19:53 -0700 Subject: [PATCH] drivers: fpga: Follow mainline to pass compatible flags to fpga_load Introducing additional flag to check whether an FPGA driver is able to load a particular FPGA bitstream image. Generally, flag variable is used to enable or disable certain features, specify additional parameters (such as error handling), or modify how the function operates. Hence, in this function flags is an integer that can be used to pass configuration options to the fpga_load function. Here, it's initialized to 0, meaning no special options are enabled, but it could modify the flags to influence the function's behavior. Signed-off-by: Muhammad Hazim Izzat Zamri Link: https://lore.kernel.org/r/20250314021953.18379-3-muhammad.hazim.izzat.zamri@altera.com Signed-off-by: Michal Simek --- drivers/fpga/altera.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/fpga/altera.c b/drivers/fpga/altera.c index 136ccfc2de4..64fda3a307c 100644 --- a/drivers/fpga/altera.c +++ b/drivers/fpga/altera.c @@ -70,8 +70,9 @@ int fpga_loadbitstream(int devnum, char *fpgadata, size_t size, bitstream_type bstype) { int ret_val; + int flags = 0; - ret_val = fpga_load(devnum, (void *)fpgadata, size, bstype); + ret_val = fpga_load(devnum, (void *)fpgadata, size, bstype, flags); /* * Enable the HPS to FPGA bridges when FPGA load is completed -- 2.39.5