Commit 1c38c922 authored by Fred Oh's avatar Fred Oh Committed by Mark Brown

ASoC: SOF: remove unused state variable in suspend function

Remove unused and no plan to use variable from suspend function.
Signed-off-by: default avatarFred Oh <fred.oh@linux.intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190722141402.7194-10-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 441c58cf
...@@ -282,7 +282,7 @@ void hda_dsp_ipc_int_disable(struct snd_sof_dev *sdev) ...@@ -282,7 +282,7 @@ void hda_dsp_ipc_int_disable(struct snd_sof_dev *sdev)
HDA_DSP_REG_HIPCCTL_BUSY | HDA_DSP_REG_HIPCCTL_DONE, 0); HDA_DSP_REG_HIPCCTL_BUSY | HDA_DSP_REG_HIPCCTL_DONE, 0);
} }
static int hda_suspend(struct snd_sof_dev *sdev, int state) static int hda_suspend(struct snd_sof_dev *sdev, bool runtime_suspend)
{ {
struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata; struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata;
const struct sof_intel_dsp_desc *chip = hda->desc; const struct sof_intel_dsp_desc *chip = hda->desc;
...@@ -431,19 +431,19 @@ int hda_dsp_runtime_idle(struct snd_sof_dev *sdev) ...@@ -431,19 +431,19 @@ int hda_dsp_runtime_idle(struct snd_sof_dev *sdev)
return 0; return 0;
} }
int hda_dsp_runtime_suspend(struct snd_sof_dev *sdev, int state) int hda_dsp_runtime_suspend(struct snd_sof_dev *sdev)
{ {
/* stop hda controller and power dsp off */ /* stop hda controller and power dsp off */
return hda_suspend(sdev, state); return hda_suspend(sdev, true);
} }
int hda_dsp_suspend(struct snd_sof_dev *sdev, int state) int hda_dsp_suspend(struct snd_sof_dev *sdev)
{ {
struct hdac_bus *bus = sof_to_bus(sdev); struct hdac_bus *bus = sof_to_bus(sdev);
int ret; int ret;
/* stop hda controller and power dsp off */ /* stop hda controller and power dsp off */
ret = hda_suspend(sdev, state); ret = hda_suspend(sdev, false);
if (ret < 0) { if (ret < 0) {
dev_err(bus->dev, "error: suspending dsp\n"); dev_err(bus->dev, "error: suspending dsp\n");
return ret; return ret;
......
...@@ -453,9 +453,9 @@ int hda_dsp_core_reset_power_down(struct snd_sof_dev *sdev, ...@@ -453,9 +453,9 @@ int hda_dsp_core_reset_power_down(struct snd_sof_dev *sdev,
void hda_dsp_ipc_int_enable(struct snd_sof_dev *sdev); void hda_dsp_ipc_int_enable(struct snd_sof_dev *sdev);
void hda_dsp_ipc_int_disable(struct snd_sof_dev *sdev); void hda_dsp_ipc_int_disable(struct snd_sof_dev *sdev);
int hda_dsp_suspend(struct snd_sof_dev *sdev, int state); int hda_dsp_suspend(struct snd_sof_dev *sdev);
int hda_dsp_resume(struct snd_sof_dev *sdev); int hda_dsp_resume(struct snd_sof_dev *sdev);
int hda_dsp_runtime_suspend(struct snd_sof_dev *sdev, int state); int hda_dsp_runtime_suspend(struct snd_sof_dev *sdev);
int hda_dsp_runtime_resume(struct snd_sof_dev *sdev); int hda_dsp_runtime_resume(struct snd_sof_dev *sdev);
int hda_dsp_runtime_idle(struct snd_sof_dev *sdev); int hda_dsp_runtime_idle(struct snd_sof_dev *sdev);
int hda_dsp_set_hw_params_upon_resume(struct snd_sof_dev *sdev); int hda_dsp_set_hw_params_upon_resume(struct snd_sof_dev *sdev);
......
...@@ -128,10 +128,10 @@ static inline int snd_sof_dsp_resume(struct snd_sof_dev *sdev) ...@@ -128,10 +128,10 @@ static inline int snd_sof_dsp_resume(struct snd_sof_dev *sdev)
return 0; return 0;
} }
static inline int snd_sof_dsp_suspend(struct snd_sof_dev *sdev, int state) static inline int snd_sof_dsp_suspend(struct snd_sof_dev *sdev)
{ {
if (sof_ops(sdev)->suspend) if (sof_ops(sdev)->suspend)
return sof_ops(sdev)->suspend(sdev, state); return sof_ops(sdev)->suspend(sdev);
return 0; return 0;
} }
...@@ -144,11 +144,10 @@ static inline int snd_sof_dsp_runtime_resume(struct snd_sof_dev *sdev) ...@@ -144,11 +144,10 @@ static inline int snd_sof_dsp_runtime_resume(struct snd_sof_dev *sdev)
return 0; return 0;
} }
static inline int snd_sof_dsp_runtime_suspend(struct snd_sof_dev *sdev, static inline int snd_sof_dsp_runtime_suspend(struct snd_sof_dev *sdev)
int state)
{ {
if (sof_ops(sdev)->runtime_suspend) if (sof_ops(sdev)->runtime_suspend)
return sof_ops(sdev)->runtime_suspend(sdev, state); return sof_ops(sdev)->runtime_suspend(sdev);
return 0; return 0;
} }
......
...@@ -377,9 +377,9 @@ static int sof_suspend(struct device *dev, bool runtime_suspend) ...@@ -377,9 +377,9 @@ static int sof_suspend(struct device *dev, bool runtime_suspend)
/* power down all DSP cores */ /* power down all DSP cores */
if (runtime_suspend) if (runtime_suspend)
ret = snd_sof_dsp_runtime_suspend(sdev, 0); ret = snd_sof_dsp_runtime_suspend(sdev);
else else
ret = snd_sof_dsp_suspend(sdev, 0); ret = snd_sof_dsp_suspend(sdev);
if (ret < 0) if (ret < 0)
dev_err(sdev->dev, dev_err(sdev->dev,
"error: failed to power down DSP during suspend %d\n", "error: failed to power down DSP during suspend %d\n",
......
...@@ -171,10 +171,9 @@ struct snd_sof_dsp_ops { ...@@ -171,10 +171,9 @@ struct snd_sof_dsp_ops {
int (*post_fw_run)(struct snd_sof_dev *sof_dev); /* optional */ int (*post_fw_run)(struct snd_sof_dev *sof_dev); /* optional */
/* DSP PM */ /* DSP PM */
int (*suspend)(struct snd_sof_dev *sof_dev, int state); /* optional */ int (*suspend)(struct snd_sof_dev *sof_dev); /* optional */
int (*resume)(struct snd_sof_dev *sof_dev); /* optional */ int (*resume)(struct snd_sof_dev *sof_dev); /* optional */
int (*runtime_suspend)(struct snd_sof_dev *sof_dev, int (*runtime_suspend)(struct snd_sof_dev *sof_dev); /* optional */
int state); /* optional */
int (*runtime_resume)(struct snd_sof_dev *sof_dev); /* optional */ int (*runtime_resume)(struct snd_sof_dev *sof_dev); /* optional */
int (*runtime_idle)(struct snd_sof_dev *sof_dev); /* optional */ int (*runtime_idle)(struct snd_sof_dev *sof_dev); /* optional */
int (*set_hw_params_upon_resume)(struct snd_sof_dev *sdev); /* optional */ int (*set_hw_params_upon_resume)(struct snd_sof_dev *sdev); /* optional */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment