[media] s5p-mfc: Remove duplicate function s5p_mfc_reload_firmware
authorArun Kumar K <arun.kk@samsung.com>
Wed, 21 May 2014 09:29:29 +0000 (06:29 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 22 Jul 2014 14:29:01 +0000 (11:29 -0300)
The function s5p_mfc_reload_firmware is exactly same as
s5p_mfc_load_firmware. So removing the duplicate function.

Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/platform/s5p-mfc/s5p_mfc.c
drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c

index 41723180d10cb7f6528b8cd33122df1314e18ca3..356eb5eb0984a6692428fce5ce35135b3c000109 100644 (file)
@@ -162,7 +162,7 @@ static void s5p_mfc_watchdog_worker(struct work_struct *work)
        /* Double check if there is at least one instance running.
         * If no instance is in memory than no firmware should be present */
        if (dev->num_inst > 0) {
-               ret = s5p_mfc_reload_firmware(dev);
+               ret = s5p_mfc_load_firmware(dev);
                if (ret) {
                        mfc_err("Failed to reload FW\n");
                        goto unlock;
index 390ca20be6efe74309b5c9272af0eb96f16d3f97..19f833ee0a55dbbe5877777ed8a21cb0db2f0bf1 100644 (file)
@@ -106,39 +106,6 @@ int s5p_mfc_load_firmware(struct s5p_mfc_dev *dev)
        return 0;
 }
 
-/* Reload firmware to MFC */
-int s5p_mfc_reload_firmware(struct s5p_mfc_dev *dev)
-{
-       struct firmware *fw_blob;
-       int err;
-
-       /* Firmare has to be present as a separate file or compiled
-        * into kernel. */
-       mfc_debug_enter();
-
-       err = request_firmware((const struct firmware **)&fw_blob,
-                                    dev->variant->fw_name, dev->v4l2_dev.dev);
-       if (err != 0) {
-               mfc_err("Firmware is not present in the /lib/firmware directory nor compiled in kernel\n");
-               return -EINVAL;
-       }
-       if (fw_blob->size > dev->fw_size) {
-               mfc_err("MFC firmware is too big to be loaded\n");
-               release_firmware(fw_blob);
-               return -ENOMEM;
-       }
-       if (!dev->fw_virt_addr) {
-               mfc_err("MFC firmware is not allocated\n");
-               release_firmware(fw_blob);
-               return -EINVAL;
-       }
-       memcpy(dev->fw_virt_addr, fw_blob->data, fw_blob->size);
-       wmb();
-       release_firmware(fw_blob);
-       mfc_debug_leave();
-       return 0;
-}
-
 /* Release firmware memory */
 int s5p_mfc_release_firmware(struct s5p_mfc_dev *dev)
 {