ASoC: do not include pm_runtime.h if not used
Commit Message
Do not include pm_runtime.h header in files where runtime PM support is
not implemented.
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
sound/hda/hdac_regmap.c | 1 -
sound/pci/hda/hda_bind.c | 1 -
sound/soc/amd/acp/acp-pci.c | 1 -
sound/soc/amd/acp/acp-platform.c | 1 -
sound/soc/codecs/cs35l45.h | 1 -
sound/soc/codecs/max98090.c | 1 -
sound/soc/codecs/max98373-i2c.c | 1 -
sound/soc/codecs/pcm186x.c | 1 -
sound/soc/codecs/rk3328_codec.c | 1 -
sound/soc/codecs/rt5682-i2c.c | 1 -
sound/soc/codecs/rt5682s.c | 1 -
sound/soc/codecs/tas2562.c | 1 -
sound/soc/codecs/tas5720.c | 1 -
sound/soc/codecs/tas6424.c | 1 -
sound/soc/codecs/wm_adsp.c | 1 -
sound/soc/fsl/imx-audmix.c | 1 -
sound/soc/intel/atom/sst/sst_acpi.c | 1 -
sound/soc/intel/atom/sst/sst_ipc.c | 1 -
sound/soc/intel/atom/sst/sst_loader.c | 1 -
sound/soc/intel/atom/sst/sst_pci.c | 1 -
sound/soc/intel/atom/sst/sst_stream.c | 1 -
sound/soc/mediatek/mt8186/mt8186-afe-control.c | 1 -
sound/soc/mediatek/mt8186/mt8186-mt6366-da7219-max98357.c | 1 -
sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c | 1 -
sound/soc/mediatek/mt8192/mt8192-afe-control.c | 2 --
sound/soc/qcom/lpass-sc7180.c | 1 -
sound/soc/qcom/lpass-sc7280.c | 1 -
sound/soc/soc-compress.c | 1 -
sound/soc/soc-pcm.c | 1 -
sound/soc/sof/intel/hda-loader-skl.c | 1 -
sound/soc/sof/intel/hda-stream.c | 1 -
sound/soc/sof/intel/skl.c | 1 -
sound/soc/sof/mediatek/mt8186/mt8186-clk.c | 1 -
sound/soc/sof/mediatek/mt8195/mt8195-clk.c | 1 -
sound/soc/tegra/tegra20_ac97.c | 1 -
sound/soc/ti/omap-mcbsp-st.c | 1 -
36 files changed, 37 deletions(-)
Comments
On Tue, Mar 07, 2023 at 12:30:22PM +0200, Claudiu Beznea wrote:
> Do not include pm_runtime.h header in files where runtime PM support is
> not implemented.
>
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
> ---
> sound/soc/codecs/cs35l45.h | 1 -
> diff --git a/sound/soc/codecs/cs35l45.h b/sound/soc/codecs/cs35l45.h
> index 53fe9d2b7b15..0555702eac03 100644
> --- a/sound/soc/codecs/cs35l45.h
> +++ b/sound/soc/codecs/cs35l45.h
> @@ -11,7 +11,6 @@
> #ifndef CS35L45_H
> #define CS35L45_H
>
> -#include <linux/pm_runtime.h>
> #include <linux/regmap.h>
> #include <linux/regulator/consumer.h>
>
cs35l45 does already make use of some functions from that header,
and more support is in the process of being upstreamed. So this
part should be dropped.
Thanks,
Charles
On Tue, Mar 07, 2023 at 12:30:22PM +0200, Claudiu Beznea wrote:
> Do not include pm_runtime.h header in files where runtime PM support is
> not implemented.
>
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
> ---
...
> sound/soc/ti/omap-mcbsp-st.c | 1 -
> 36 files changed, 37 deletions(-)
Looks like header was copied by accident from omap-mcbsp.c when sidetone
functionality was split into this new file.
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
On 07/03/2023 10:30, Claudiu Beznea wrote:
> diff --git a/sound/soc/qcom/lpass-sc7180.c b/sound/soc/qcom/lpass-sc7180.c
> index 41db6617e2ed..dc892fac4baa 100644
> --- a/sound/soc/qcom/lpass-sc7180.c
> +++ b/sound/soc/qcom/lpass-sc7180.c
> @@ -12,7 +12,6 @@
> #include <linux/module.h>
> #include <linux/of.h>
> #include <linux/platform_device.h>
> -#include <linux/pm_runtime.h>
> #include <dt-bindings/sound/sc7180-lpass.h>
> #include <sound/pcm.h>
> #include <sound/soc.h>
> diff --git a/sound/soc/qcom/lpass-sc7280.c b/sound/soc/qcom/lpass-sc7280.c
> index d43f480cbae3..ee4a4b553e74 100644
> --- a/sound/soc/qcom/lpass-sc7280.c
> +++ b/sound/soc/qcom/lpass-sc7280.c
> @@ -8,7 +8,6 @@
> #include <linux/module.h>
> #include <sound/pcm.h>
> #include <sound/soc.h>
> -#include <linux/pm_runtime.h>
>
> #include <dt-bindings/sound/sc7180-lpass.h>
Has these been compile tested? the reason I ask is because both these
drivers need SET_SYSTEM_SLEEP_PM_OPS macro from pm.h which was getting
included from pm_runtime.h, now that is removed, am guessing it will
cause a compile errors.
can you atleast replace this with pm.h instead of removing it totally?
--srini
On 10.03.2023 09:29, Srinivas Kandagatla wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
>
> On 07/03/2023 10:30, Claudiu Beznea wrote:
>> diff --git a/sound/soc/qcom/lpass-sc7180.c b/sound/soc/qcom/lpass-sc7180.c
>> index 41db6617e2ed..dc892fac4baa 100644
>> --- a/sound/soc/qcom/lpass-sc7180.c
>> +++ b/sound/soc/qcom/lpass-sc7180.c
>> @@ -12,7 +12,6 @@
>> #include <linux/module.h>
>> #include <linux/of.h>
>> #include <linux/platform_device.h>
>> -#include <linux/pm_runtime.h>
>> #include <dt-bindings/sound/sc7180-lpass.h>
>> #include <sound/pcm.h>
>> #include <sound/soc.h>
>> diff --git a/sound/soc/qcom/lpass-sc7280.c b/sound/soc/qcom/lpass-sc7280.c
>> index d43f480cbae3..ee4a4b553e74 100644
>> --- a/sound/soc/qcom/lpass-sc7280.c
>> +++ b/sound/soc/qcom/lpass-sc7280.c
>> @@ -8,7 +8,6 @@
>> #include <linux/module.h>
>> #include <sound/pcm.h>
>> #include <sound/soc.h>
>> -#include <linux/pm_runtime.h>
>>
>> #include <dt-bindings/sound/sc7180-lpass.h>
>
> Has these been compile tested? the reason I ask is because both these
> drivers need SET_SYSTEM_SLEEP_PM_OPS macro from pm.h which was getting
> included from pm_runtime.h, now that is removed, am guessing it will
> cause a compile errors.
I remember I compiled them all. But I will double check it.
>
> can you atleast replace this with pm.h instead of removing it totally?
Sure! Thanks for pointing it.
>
> --srini
@@ -17,7 +17,6 @@
#include <linux/regmap.h>
#include <linux/export.h>
#include <linux/pm.h>
-#include <linux/pm_runtime.h>
#include <sound/core.h>
#include <sound/hdaudio.h>
#include <sound/hda_regmap.h>
@@ -10,7 +10,6 @@
#include <linux/module.h>
#include <linux/export.h>
#include <linux/pm.h>
-#include <linux/pm_runtime.h>
#include <sound/core.h>
#include <sound/hda_codec.h>
#include "hda_local.h"
@@ -15,7 +15,6 @@
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/platform_device.h>
-#include <linux/pm_runtime.h>
#include <linux/module.h>
#include "amd.h"
@@ -18,7 +18,6 @@
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/soc-dai.h>
-#include <linux/pm_runtime.h>
#include <linux/dma-mapping.h>
#include "amd.h"
@@ -11,7 +11,6 @@
#ifndef CS35L45_H
#define CS35L45_H
-#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
@@ -10,7 +10,6 @@
#include <linux/module.h>
#include <linux/of.h>
#include <linux/pm.h>
-#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <linux/acpi.h>
@@ -9,7 +9,6 @@
#include <linux/mod_devicetable.h>
#include <linux/of.h>
#include <linux/of_gpio.h>
-#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <linux/cdev.h>
@@ -12,7 +12,6 @@
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/pm.h>
-#include <linux/pm_runtime.h>
#include <linux/regulator/consumer.h>
#include <linux/regmap.h>
#include <linux/slab.h>
@@ -11,7 +11,6 @@
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
-#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/mfd/syscon.h>
#include <sound/dmaengine_pcm.h>
@@ -11,7 +11,6 @@
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/pm.h>
-#include <linux/pm_runtime.h>
#include <linux/i2c.h>
#include <linux/platform_device.h>
#include <linux/spi/spi.h>
@@ -11,7 +11,6 @@
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/pm.h>
-#include <linux/pm_runtime.h>
#include <linux/i2c.h>
#include <linux/platform_device.h>
#include <linux/spi/spi.h>
@@ -8,7 +8,6 @@
#include <linux/errno.h>
#include <linux/device.h>
#include <linux/i2c.h>
-#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <linux/gpio/consumer.h>
@@ -11,7 +11,6 @@
#include <linux/errno.h>
#include <linux/device.h>
#include <linux/i2c.h>
-#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <linux/regulator/consumer.h>
@@ -11,7 +11,6 @@
#include <linux/errno.h>
#include <linux/device.h>
#include <linux/i2c.h>
-#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <linux/regulator/consumer.h>
@@ -15,7 +15,6 @@
#include <linux/firmware.h>
#include <linux/list.h>
#include <linux/pm.h>
-#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
#include <linux/slab.h>
@@ -15,7 +15,6 @@
#include <linux/clk.h>
#include <sound/soc.h>
#include <sound/soc-dapm.h>
-#include <linux/pm_runtime.h>
#include "fsl_sai.h"
#include "fsl_audmix.h"
@@ -15,7 +15,6 @@
#include <linux/io.h>
#include <linux/platform_device.h>
#include <linux/firmware.h>
-#include <linux/pm_runtime.h>
#include <linux/pm_qos.h>
#include <linux/dmi.h>
#include <linux/acpi.h>
@@ -15,7 +15,6 @@
#include <linux/firmware.h>
#include <linux/sched.h>
#include <linux/delay.h>
-#include <linux/pm_runtime.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/soc.h>
@@ -20,7 +20,6 @@
#include <linux/sched.h>
#include <linux/firmware.h>
#include <linux/dmaengine.h>
-#include <linux/pm_runtime.h>
#include <linux/pm_qos.h>
#include <sound/core.h>
#include <sound/pcm.h>
@@ -15,7 +15,6 @@
#include <linux/pci.h>
#include <linux/fs.h>
#include <linux/firmware.h>
-#include <linux/pm_runtime.h>
#include <sound/core.h>
#include <sound/soc.h>
#include <asm/platform_sst_audio.h>
@@ -15,7 +15,6 @@
#include <linux/firmware.h>
#include <linux/sched.h>
#include <linux/delay.h>
-#include <linux/pm_runtime.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/soc.h>
@@ -6,7 +6,6 @@
// Author: Jiaxin Yu <jiaxin.yu@mediatek.com>
#include "mt8186-afe-common.h"
-#include <linux/pm_runtime.h>
enum {
MTK_AFE_RATE_8K = 0,
@@ -10,7 +10,6 @@
#include <linux/input.h>
#include <linux/module.h>
#include <linux/of_device.h>
-#include <linux/pm_runtime.h>
#include <sound/jack.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
@@ -12,7 +12,6 @@
#include <linux/input.h>
#include <linux/module.h>
#include <linux/of_device.h>
-#include <linux/pm_runtime.h>
#include <sound/jack.h>
#include <sound/pcm_params.h>
#include <sound/rt5682.h>
@@ -6,8 +6,6 @@
// Author: Shane Chien <shane.chien@mediatek.com>
//
-#include <linux/pm_runtime.h>
-
#include "mt8192-afe-common.h"
enum {
@@ -12,7 +12,6 @@
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
-#include <linux/pm_runtime.h>
#include <dt-bindings/sound/sc7180-lpass.h>
#include <sound/pcm.h>
#include <sound/soc.h>
@@ -8,7 +8,6 @@
#include <linux/module.h>
#include <sound/pcm.h>
#include <sound/soc.h>
-#include <linux/pm_runtime.h>
#include <dt-bindings/sound/sc7180-lpass.h>
@@ -20,7 +20,6 @@
#include <sound/initval.h>
#include <sound/soc-dpcm.h>
#include <sound/soc-link.h>
-#include <linux/pm_runtime.h>
static int snd_soc_compr_components_open(struct snd_compr_stream *cstream)
{
@@ -14,7 +14,6 @@
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/pinctrl/consumer.h>
-#include <linux/pm_runtime.h>
#include <linux/slab.h>
#include <linux/workqueue.h>
#include <linux/export.h>
@@ -15,7 +15,6 @@
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/pci.h>
-#include <linux/pm_runtime.h>
#include <linux/slab.h>
#include <sound/hdaudio_ext.h>
#include <sound/sof.h>
@@ -15,7 +15,6 @@
* Hardware interface for generic Intel audio DSP HDA IP
*/
-#include <linux/pm_runtime.h>
#include <sound/hdaudio_ext.h>
#include <sound/hda_register.h>
#include <sound/sof.h>
@@ -19,7 +19,6 @@
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/pci.h>
-#include <linux/pm_runtime.h>
#include <sound/hdaudio_ext.h>
#include <sound/pcm_params.h>
#include <sound/sof.h>
@@ -8,7 +8,6 @@
// Hardware interface for mt8186 DSP clock
#include <linux/clk.h>
-#include <linux/pm_runtime.h>
#include <linux/io.h>
#include "../../sof-audio.h"
@@ -7,7 +7,6 @@
// Hardware interface for mt8195 DSP clock
#include <linux/clk.h>
-#include <linux/pm_runtime.h>
#include <linux/io.h>
#include "mt8195.h"
#include "mt8195-clk.h"
@@ -19,7 +19,6 @@
#include <linux/of.h>
#include <linux/of_gpio.h>
#include <linux/platform_device.h>
-#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/reset.h>
#include <linux/slab.h>
@@ -19,7 +19,6 @@
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/slab.h>
-#include <linux/pm_runtime.h>
#include "omap-mcbsp.h"
#include "omap-mcbsp-priv.h"