diff mbox series

[12/20] media: atomisp: Remove atomisp_mrfld_power_down()/_up()

Message ID 20221120224101.746199-13-hdegoede@redhat.com
State Accepted
Commit 10f2b0a3a12e360aff944750a18693a71c39d8f9
Headers show
Series media: atomisp: Misc. cleanups / fixes | expand

Commit Message

Hans de Goede Nov. 20, 2022, 10:40 p.m. UTC
atomisp_mrfld_power_down()/_up() are unnecessary wrappers around
atomisp_mrfld_power() remove them and just call atomisp_mrfld_power()
directly.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 .../staging/media/atomisp/pci/atomisp_v4l2.c  | 22 +++++--------------
 1 file changed, 5 insertions(+), 17 deletions(-)
diff mbox series

Patch

diff --git a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
index d7fb700252fa..f009a1bfd3ea 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
@@ -724,18 +724,6 @@  static int atomisp_mrfld_power(struct atomisp_device *isp, bool enable)
 	return -EBUSY;
 }
 
-/* Workaround for pmu_nc_set_power_state not ready in MRFLD */
-static int atomisp_mrfld_power_down(struct atomisp_device *isp)
-{
-	return atomisp_mrfld_power(isp, false);
-}
-
-/* Workaround for pmu_nc_set_power_state not ready in MRFLD */
-static int atomisp_mrfld_power_up(struct atomisp_device *isp)
-{
-	return atomisp_mrfld_power(isp, true);
-}
-
 int atomisp_runtime_suspend(struct device *dev)
 {
 	struct atomisp_device *isp = (struct atomisp_device *)
@@ -751,7 +739,7 @@  int atomisp_runtime_suspend(struct device *dev)
 	if (ret)
 		return ret;
 	cpu_latency_qos_update_request(&isp->pm_qos, PM_QOS_DEFAULT_VALUE);
-	return atomisp_mrfld_power_down(isp);
+	return atomisp_mrfld_power(isp, false);
 }
 
 int atomisp_runtime_resume(struct device *dev)
@@ -760,7 +748,7 @@  int atomisp_runtime_resume(struct device *dev)
 				     dev_get_drvdata(dev);
 	int ret;
 
-	ret = atomisp_mrfld_power_up(isp);
+	ret = atomisp_mrfld_power(isp, true);
 	if (ret)
 		return ret;
 
@@ -817,7 +805,7 @@  static int __maybe_unused atomisp_suspend(struct device *dev)
 		return ret;
 	}
 	cpu_latency_qos_update_request(&isp->pm_qos, PM_QOS_DEFAULT_VALUE);
-	return atomisp_mrfld_power_down(isp);
+	return atomisp_mrfld_power(isp, false);
 }
 
 static int __maybe_unused atomisp_resume(struct device *dev)
@@ -826,7 +814,7 @@  static int __maybe_unused atomisp_resume(struct device *dev)
 				     dev_get_drvdata(dev);
 	int ret;
 
-	ret = atomisp_mrfld_power_up(isp);
+	ret = atomisp_mrfld_power(isp, true);
 	if (ret)
 		return ret;
 
@@ -1726,7 +1714,7 @@  static int atomisp_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i
 	atomisp_ospm_dphy_down(isp);
 
 	/* Address later when we worry about the ...field chips */
-	if (IS_ENABLED(CONFIG_PM) && atomisp_mrfld_power_down(isp))
+	if (IS_ENABLED(CONFIG_PM) && atomisp_mrfld_power(isp, false))
 		dev_err(&pdev->dev, "Failed to switch off ISP\n");
 
 atomisp_dev_alloc_fail: