]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: atomisp: Remove firmware_name module parameter
authorHans de Goede <hdegoede@redhat.com>
Mon, 3 Jun 2024 13:20:54 +0000 (15:20 +0200)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Tue, 2 Jul 2024 19:23:13 +0000 (21:23 +0200)
There is no need for the user to be able to specify a different
name for the firmware being loaded. Most other kernel drivers do not
have this and work fine without it.

Drop this unnecessary module parameter.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240603132057.255917-2-hdegoede@redhat.com
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/staging/media/atomisp/pci/atomisp_v4l2.c

index 8b522baf2e66f240c510e0c02ad329748e45217c..cfdfbf96c3fec2130da89411f15ad179641c6c42 100644 (file)
@@ -66,10 +66,6 @@ module_param(dbg_func, int, 0644);
 MODULE_PARM_DESC(dbg_func,
                 "log function switch non/printk (default:printk)");
 
-static char firmware_name[256];
-module_param_string(firmware_name, firmware_name, sizeof(firmware_name), 0);
-MODULE_PARM_DESC(firmware_name, "Firmware file name. Allows overriding the default firmware name.");
-
 /*
  * Set to 16x16 since this is the amount of lines and pixels the sensor
  * exports extra. If these are kept at the 10x8 that they were on, in yuv
@@ -1101,23 +1097,19 @@ atomisp_load_firmware(struct atomisp_device *isp)
        int rc;
        char *fw_path = NULL;
 
-       if (firmware_name[0] != '\0') {
-               fw_path = firmware_name;
-       } else {
-               if ((isp->media_dev.hw_revision  >> ATOMISP_HW_REVISION_SHIFT)
-                   == ATOMISP_HW_REVISION_ISP2401)
-                       fw_path = "shisp_2401a0_v21.bin";
-
-               if (isp->media_dev.hw_revision ==
-                   ((ATOMISP_HW_REVISION_ISP2401_LEGACY << ATOMISP_HW_REVISION_SHIFT)
-                   | ATOMISP_HW_STEPPING_A0))
-                       fw_path = "shisp_2401a0_legacy_v21.bin";
-
-               if (isp->media_dev.hw_revision ==
-                   ((ATOMISP_HW_REVISION_ISP2400 << ATOMISP_HW_REVISION_SHIFT)
-                   | ATOMISP_HW_STEPPING_B0))
-                       fw_path = "shisp_2400b0_v21.bin";
-       }
+       if ((isp->media_dev.hw_revision >> ATOMISP_HW_REVISION_SHIFT) ==
+           ATOMISP_HW_REVISION_ISP2401)
+               fw_path = "shisp_2401a0_v21.bin";
+
+       if (isp->media_dev.hw_revision ==
+           ((ATOMISP_HW_REVISION_ISP2401_LEGACY << ATOMISP_HW_REVISION_SHIFT) |
+            ATOMISP_HW_STEPPING_A0))
+               fw_path = "shisp_2401a0_legacy_v21.bin";
+
+       if (isp->media_dev.hw_revision ==
+           ((ATOMISP_HW_REVISION_ISP2400 << ATOMISP_HW_REVISION_SHIFT) |
+            ATOMISP_HW_STEPPING_B0))
+               fw_path = "shisp_2400b0_v21.bin";
 
        if (!fw_path) {
                dev_err(isp->dev, "Unsupported hw_revision 0x%x\n",