diff options
author | Arun Kumar K <arun.kk@samsung.com> | 2014-05-21 06:29:29 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-07-22 11:29:01 -0300 |
commit | 46075006d98eb59a0f7c8bc04035eb7e40b0a067 (patch) | |
tree | dcdb3adfebf2ab3612d65cd9c6abc2ea5c8c1e2e | |
parent | e35ce2e4b2c7657e9e23b618c861c258ce4a57bf (diff) |
[media] s5p-mfc: Remove duplicate function s5p_mfc_reload_firmware
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>
-rw-r--r-- | drivers/media/platform/s5p-mfc/s5p_mfc.c | 2 | ||||
-rw-r--r-- | drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c | 33 |
2 files changed, 1 insertions, 34 deletions
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index 41723180d10c..356eb5eb0984 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c @@ -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; diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c b/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c index 390ca20be6ef..19f833ee0a55 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c @@ -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) { |