This parameter allows the program bus width to be specified at module insertion time. Signed-off-by: Cihangir Akturk <cakturk@xxxxxxxxx> --- drivers/staging/gs_fpgaboot/gs_fpgaboot.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/staging/gs_fpgaboot/gs_fpgaboot.c b/drivers/staging/gs_fpgaboot/gs_fpgaboot.c index 6aa9d7c..7bf8ea9 100644 --- a/drivers/staging/gs_fpgaboot/gs_fpgaboot.c +++ b/drivers/staging/gs_fpgaboot/gs_fpgaboot.c @@ -43,8 +43,12 @@ static uint8_t bits_magic[] = { static struct platform_device *firmware_pdev; static char *file = "xlinx_fpga_firmware.bit"; +static int bus_width = bus_2byte; + module_param(file, charp, S_IRUGO); MODULE_PARM_DESC(file, "Xilinx FPGA firmware file."); +module_param(bus_width, int, S_IRUGO); +MODULE_PARM_DESC(bus_width, "program bus width in bytes (valid values 1-2, default=2)"); #ifdef DEBUG_FPGA static void datadump(char *msg, void *m, int n) @@ -339,7 +343,7 @@ static int gs_fpgaboot(void) goto err_out2; } - err = gs_download_image(fimage, bus_2byte); + err = gs_download_image(fimage, bus_width); if (err) { pr_err("gs_download_image error\n"); goto err_out2; -- 1.7.9.5 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel