[PATCH 64/81] sound: Remove <common.h> and add needed includes

Kever Yang kever.yang at rock-chips.com
Fri May 10 02:44:09 CEST 2024


On 2024/5/2 09:31, Tom Rini wrote:
> Remove <common.h> from this driver directory and when needed
> add missing include files directly.
>
> Signed-off-by: Tom Rini <trini at konsulko.com>
Reviewed-by: Kever Yang <kever.yang at rock-chips.com>

Thanks,
- Kever
> ---
> Cc: Tom Rini <trini at konsulko.com>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Philipp Tomsich <philipp.tomsich at vrull.eu>
> Cc: Kever Yang <kever.yang at rock-chips.com>
> Cc: Thierry Reding <treding at nvidia.com>
> Cc: Svyatoslav Ryhel <clamor95 at gmail.com>
> ---
>   drivers/sound/broadwell_i2s.c   | 1 -
>   drivers/sound/broadwell_sound.c | 1 -
>   drivers/sound/codec-uclass.c    | 1 -
>   drivers/sound/da7219.c          | 1 -
>   drivers/sound/hda_codec.c       | 1 -
>   drivers/sound/i2s-uclass.c      | 1 -
>   drivers/sound/i8254_beep.c      | 1 -
>   drivers/sound/ivybridge_sound.c | 1 -
>   drivers/sound/max98088.c        | 1 -
>   drivers/sound/max98090.c        | 1 -
>   drivers/sound/max98095.c        | 1 -
>   drivers/sound/max98357a.c       | 1 -
>   drivers/sound/maxim_codec.c     | 1 -
>   drivers/sound/rockchip_i2s.c    | 1 -
>   drivers/sound/rockchip_sound.c  | 1 -
>   drivers/sound/rt5677.c          | 1 -
>   drivers/sound/samsung-i2s.c     | 2 +-
>   drivers/sound/samsung_sound.c   | 1 -
>   drivers/sound/sandbox.c         | 1 -
>   drivers/sound/sound-uclass.c    | 1 -
>   drivers/sound/sound.c           | 2 +-
>   drivers/sound/tegra_ahub.c      | 2 +-
>   drivers/sound/tegra_i2s.c       | 1 -
>   drivers/sound/tegra_sound.c     | 1 -
>   drivers/sound/wm8994.c          | 1 -
>   25 files changed, 3 insertions(+), 25 deletions(-)
>
> diff --git a/drivers/sound/broadwell_i2s.c b/drivers/sound/broadwell_i2s.c
> index 7f754e656761..bc44b5ec7e1f 100644
> --- a/drivers/sound/broadwell_i2s.c
> +++ b/drivers/sound/broadwell_i2s.c
> @@ -9,7 +9,6 @@
>   
>   #define LOG_CATEGORY UCLASS_I2S
>   
> -#include <common.h>
>   #include <dm.h>
>   #include <i2s.h>
>   #include <log.h>
> diff --git a/drivers/sound/broadwell_sound.c b/drivers/sound/broadwell_sound.c
> index 6e083fe1f696..473f8d8f9771 100644
> --- a/drivers/sound/broadwell_sound.c
> +++ b/drivers/sound/broadwell_sound.c
> @@ -8,7 +8,6 @@
>   
>   #define LOG_CATEGORY UCLASS_SOUND
>   
> -#include <common.h>
>   #include <audio_codec.h>
>   #include <dm.h>
>   #include <i2s.h>
> diff --git a/drivers/sound/codec-uclass.c b/drivers/sound/codec-uclass.c
> index 2cb233bd3060..1c1560619ea5 100644
> --- a/drivers/sound/codec-uclass.c
> +++ b/drivers/sound/codec-uclass.c
> @@ -6,7 +6,6 @@
>   
>   #define LOG_CATEGORY UCLASS_AUDIO_CODEC
>   
> -#include <common.h>
>   #include <dm.h>
>   #include <audio_codec.h>
>   
> diff --git a/drivers/sound/da7219.c b/drivers/sound/da7219.c
> index c1edef443608..5b9b3f65263f 100644
> --- a/drivers/sound/da7219.c
> +++ b/drivers/sound/da7219.c
> @@ -6,7 +6,6 @@
>    * Parts taken from coreboot
>    */
>   
> -#include <common.h>
>   #include <dm.h>
>   #include <i2c.h>
>   #include <irq.h>
> diff --git a/drivers/sound/hda_codec.c b/drivers/sound/hda_codec.c
> index af6148ef7240..da8bde67de65 100644
> --- a/drivers/sound/hda_codec.c
> +++ b/drivers/sound/hda_codec.c
> @@ -7,7 +7,6 @@
>   
>   #define LOG_CATEGORY	UCLASS_SOUND
>   
> -#include <common.h>
>   #include <dm.h>
>   #include <hda_codec.h>
>   #include <log.h>
> diff --git a/drivers/sound/i2s-uclass.c b/drivers/sound/i2s-uclass.c
> index fc4f686b516d..6263c4d70719 100644
> --- a/drivers/sound/i2s-uclass.c
> +++ b/drivers/sound/i2s-uclass.c
> @@ -6,7 +6,6 @@
>   
>   #define LOG_CATEGORY UCLASS_I2S
>   
> -#include <common.h>
>   #include <dm.h>
>   #include <i2s.h>
>   
> diff --git a/drivers/sound/i8254_beep.c b/drivers/sound/i8254_beep.c
> index 5572dc4d265d..7234ad4a07e5 100644
> --- a/drivers/sound/i8254_beep.c
> +++ b/drivers/sound/i8254_beep.c
> @@ -3,7 +3,6 @@
>    * Copyright 2018 Google LLC
>    */
>   
> -#include <common.h>
>   #include <dm.h>
>   #include <sound.h>
>   #include <asm/i8254.h>
> diff --git a/drivers/sound/ivybridge_sound.c b/drivers/sound/ivybridge_sound.c
> index d982219e06de..aeeba1d267ec 100644
> --- a/drivers/sound/ivybridge_sound.c
> +++ b/drivers/sound/ivybridge_sound.c
> @@ -12,7 +12,6 @@
>   
>   #define LOG_CATEGORY UCLASS_SOUND
>   
> -#include <common.h>
>   #include <dm.h>
>   #include <hda_codec.h>
>   #include <log.h>
> diff --git a/drivers/sound/max98088.c b/drivers/sound/max98088.c
> index c0463b8e8a62..d9037641ca46 100644
> --- a/drivers/sound/max98088.c
> +++ b/drivers/sound/max98088.c
> @@ -8,7 +8,6 @@
>    * following the changes made in max98095.c
>    */
>   
> -#include <common.h>
>   #include <audio_codec.h>
>   #include <div64.h>
>   #include <dm.h>
> diff --git a/drivers/sound/max98090.c b/drivers/sound/max98090.c
> index a798762f1ee7..18a3ffa85c8e 100644
> --- a/drivers/sound/max98090.c
> +++ b/drivers/sound/max98090.c
> @@ -5,7 +5,6 @@
>    * Copyright 2011 Maxim Integrated Products
>    */
>   
> -#include <common.h>
>   #include <audio_codec.h>
>   #include <div64.h>
>   #include <dm.h>
> diff --git a/drivers/sound/max98095.c b/drivers/sound/max98095.c
> index d0f701aaf105..96e772cff21b 100644
> --- a/drivers/sound/max98095.c
> +++ b/drivers/sound/max98095.c
> @@ -7,7 +7,6 @@
>    * Modified for U-Boot by R. Chandrasekar (rcsekar at samsung.com)
>    */
>   
> -#include <common.h>
>   #include <audio_codec.h>
>   #include <dm.h>
>   #include <div64.h>
> diff --git a/drivers/sound/max98357a.c b/drivers/sound/max98357a.c
> index bdf6dc236ec3..da56ffdd6bb4 100644
> --- a/drivers/sound/max98357a.c
> +++ b/drivers/sound/max98357a.c
> @@ -6,7 +6,6 @@
>    * Parts taken from coreboot
>    */
>   
> -#include <common.h>
>   #include <audio_codec.h>
>   #include <dm.h>
>   #include <log.h>
> diff --git a/drivers/sound/maxim_codec.c b/drivers/sound/maxim_codec.c
> index 6553d9590472..98f094c0e9ad 100644
> --- a/drivers/sound/maxim_codec.c
> +++ b/drivers/sound/maxim_codec.c
> @@ -5,7 +5,6 @@
>    * Copyright 2011 Maxim Integrated Products
>    */
>   
> -#include <common.h>
>   #include <div64.h>
>   #include <i2c.h>
>   #include <i2s.h>
> diff --git a/drivers/sound/rockchip_i2s.c b/drivers/sound/rockchip_i2s.c
> index 4e9e68aaac81..5078dfbed07d 100644
> --- a/drivers/sound/rockchip_i2s.c
> +++ b/drivers/sound/rockchip_i2s.c
> @@ -7,7 +7,6 @@
>   
>   #define LOG_CATEGORY UCLASS_I2S
>   
> -#include <common.h>
>   #include <dm.h>
>   #include <i2s.h>
>   #include <log.h>
> diff --git a/drivers/sound/rockchip_sound.c b/drivers/sound/rockchip_sound.c
> index 94058e603d7d..418d2efd4526 100644
> --- a/drivers/sound/rockchip_sound.c
> +++ b/drivers/sound/rockchip_sound.c
> @@ -6,7 +6,6 @@
>   
>   #define LOG_CATEGORY UCLASS_SOUND
>   
> -#include <common.h>
>   #include <audio_codec.h>
>   #include <clk.h>
>   #include <dm.h>
> diff --git a/drivers/sound/rt5677.c b/drivers/sound/rt5677.c
> index b655bb40b642..b5c997c6dd53 100644
> --- a/drivers/sound/rt5677.c
> +++ b/drivers/sound/rt5677.c
> @@ -5,7 +5,6 @@
>   
>   #define LOG_CATEGORY UCLASS_SOUND
>   
> -#include <common.h>
>   #include <audio_codec.h>
>   #include <dm.h>
>   #include <i2c.h>
> diff --git a/drivers/sound/samsung-i2s.c b/drivers/sound/samsung-i2s.c
> index dc5a2789aeed..42175fd7d28b 100644
> --- a/drivers/sound/samsung-i2s.c
> +++ b/drivers/sound/samsung-i2s.c
> @@ -4,11 +4,11 @@
>    * R. Chandrasekar <rcsekar at samsung.com>
>    */
>   
> -#include <common.h>
>   #include <dm.h>
>   #include <i2s.h>
>   #include <log.h>
>   #include <sound.h>
> +#include <time.h>
>   #include <asm/arch/clk.h>
>   #include <asm/arch/pinmux.h>
>   #include <asm/arch/i2s-regs.h>
> diff --git a/drivers/sound/samsung_sound.c b/drivers/sound/samsung_sound.c
> index 473cedf7e974..9150ad4a63ba 100644
> --- a/drivers/sound/samsung_sound.c
> +++ b/drivers/sound/samsung_sound.c
> @@ -4,7 +4,6 @@
>    * Written by Simon Glass <sjg at chromium.org>
>    */
>   
> -#include <common.h>
>   #include <audio_codec.h>
>   #include <dm.h>
>   #include <i2s.h>
> diff --git a/drivers/sound/sandbox.c b/drivers/sound/sandbox.c
> index c6cbd81fdbce..31ae153530e8 100644
> --- a/drivers/sound/sandbox.c
> +++ b/drivers/sound/sandbox.c
> @@ -5,7 +5,6 @@
>   
>   #define LOG_CATEGORY UCLASS_SOUND
>   
> -#include <common.h>
>   #include <audio_codec.h>
>   #include <dm.h>
>   #include <i2s.h>
> diff --git a/drivers/sound/sound-uclass.c b/drivers/sound/sound-uclass.c
> index 2ffc4fc7c1db..b8a3dab447d9 100644
> --- a/drivers/sound/sound-uclass.c
> +++ b/drivers/sound/sound-uclass.c
> @@ -6,7 +6,6 @@
>   
>   #define LOG_CATEGORY UCLASS_SOUND
>   
> -#include <common.h>
>   #include <dm.h>
>   #include <i2s.h>
>   #include <log.h>
> diff --git a/drivers/sound/sound.c b/drivers/sound/sound.c
> index c0fc50c99dac..4fde2989e04f 100644
> --- a/drivers/sound/sound.c
> +++ b/drivers/sound/sound.c
> @@ -4,9 +4,9 @@
>    * R. Chandrasekar <rcsekar at samsung.com>
>    */
>   
> -#include <common.h>
>   #include <log.h>
>   #include <sound.h>
> +#include <linux/string.h>
>   
>   void sound_create_square_wave(uint sample_rate, unsigned short *data, int size,
>   			      uint freq, uint channels)
> diff --git a/drivers/sound/tegra_ahub.c b/drivers/sound/tegra_ahub.c
> index 495a29c5137c..8f1b0c009a88 100644
> --- a/drivers/sound/tegra_ahub.c
> +++ b/drivers/sound/tegra_ahub.c
> @@ -7,11 +7,11 @@
>   
>   #define LOG_CATEGORY UCLASS_MISC
>   
> -#include <common.h>
>   #include <dm.h>
>   #include <i2s.h>
>   #include <log.h>
>   #include <misc.h>
> +#include <time.h>
>   #include <asm/io.h>
>   #include <asm/arch-tegra/tegra_ahub.h>
>   #include <asm/arch-tegra/tegra_i2s.h>
> diff --git a/drivers/sound/tegra_i2s.c b/drivers/sound/tegra_i2s.c
> index 932f737900e4..357aac36ceaa 100644
> --- a/drivers/sound/tegra_i2s.c
> +++ b/drivers/sound/tegra_i2s.c
> @@ -5,7 +5,6 @@
>    */
>   #define LOG_CATEGORY UCLASS_I2S
>   
> -#include <common.h>
>   #include <dm.h>
>   #include <i2s.h>
>   #include <log.h>
> diff --git a/drivers/sound/tegra_sound.c b/drivers/sound/tegra_sound.c
> index aef6a2eb1475..152c929146f5 100644
> --- a/drivers/sound/tegra_sound.c
> +++ b/drivers/sound/tegra_sound.c
> @@ -6,7 +6,6 @@
>   
>   #define LOG_CATEGORY UCLASS_I2S
>   
> -#include <common.h>
>   #include <audio_codec.h>
>   #include <dm.h>
>   #include <i2s.h>
> diff --git a/drivers/sound/wm8994.c b/drivers/sound/wm8994.c
> index fd646479b315..6b3091aa5de1 100644
> --- a/drivers/sound/wm8994.c
> +++ b/drivers/sound/wm8994.c
> @@ -3,7 +3,6 @@
>    * Copyright (C) 2012 Samsung Electronics
>    * R. Chandrasekar <rcsekar at samsung.com>
>    */
> -#include <common.h>
>   #include <audio_codec.h>
>   #include <dm.h>
>   #include <div64.h>


More information about the U-Boot mailing list