summaryrefslogtreecommitdiff
path: root/drivers/media/pci/intel/ipu6/ipu6.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/pci/intel/ipu6/ipu6.c')
-rw-r--r--drivers/media/pci/intel/ipu6/ipu6.c41
1 files changed, 1 insertions, 40 deletions
diff --git a/drivers/media/pci/intel/ipu6/ipu6.c b/drivers/media/pci/intel/ipu6/ipu6.c
index 7bcd9c5a381a..2cf04251c9e7 100644
--- a/drivers/media/pci/intel/ipu6/ipu6.c
+++ b/drivers/media/pci/intel/ipu6/ipu6.c
@@ -503,45 +503,6 @@ static void ipu6_configure_vc_mechanism(struct ipu6_device *isp)
writel(val, isp->base + BUTTRESS_REG_BTRS_CTRL);
}
-static int request_cpd_fw(const struct firmware **firmware_p, const char *name,
- struct device *device)
-{
- const struct firmware *fw;
- struct firmware *dst;
- int ret = 0;
-
- ret = request_firmware(&fw, name, device);
- if (ret)
- return ret;
-
- if (is_vmalloc_addr(fw->data)) {
- *firmware_p = fw;
- return 0;
- }
-
- dst = kzalloc(sizeof(*dst), GFP_KERNEL);
- if (!dst) {
- ret = -ENOMEM;
- goto release_firmware;
- }
-
- dst->size = fw->size;
- dst->data = vmalloc(fw->size);
- if (!dst->data) {
- kfree(dst);
- ret = -ENOMEM;
- goto release_firmware;
- }
-
- memcpy((void *)dst->data, fw->data, fw->size);
- *firmware_p = dst;
-
-release_firmware:
- release_firmware(fw);
-
- return ret;
-}
-
static int ipu6_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
{
struct ipu6_buttress_ctrl *isys_ctrl = NULL, *psys_ctrl = NULL;
@@ -627,7 +588,7 @@ static int ipu6_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
if (ret)
return ret;
- ret = request_cpd_fw(&isp->cpd_fw, isp->cpd_fw_name, dev);
+ ret = request_firmware(&isp->cpd_fw, isp->cpd_fw_name, dev);
if (ret) {
dev_err_probe(&isp->pdev->dev, ret,
"Requesting signed firmware %s failed\n",