Commit 10f2b0a3 authored by Hans de Goede's avatar Hans de Goede Committed by Mauro Carvalho Chehab
Browse files

media: atomisp: Remove atomisp_mrfld_power_down()/_up()



atomisp_mrfld_power_down()/_up() are unnecessary wrappers around
atomisp_mrfld_power() remove them and just call atomisp_mrfld_power()
directly.

Reviewed-by: default avatarAndy Shevchenko <andy@kernel.org>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 24aba582
Loading
Loading
Loading
Loading
+5 −17
Original line number Diff line number Diff line
@@ -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: