[01/49] ASoC: simple-card: remove duplicate header
diff mbox

Message ID 87k2iprs5w.wl%kuninori.morimoto.gx@renesas.com
State New
Headers show

Commit Message

Kuninori Morimoto May 20, 2016, 9:38 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

simple-card.h includes soc.h, and soc.h includes soc-dai.h
Let's remove these header.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/generic/simple-card.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Mark Brown May 30, 2016, 4 p.m. UTC | #1
On Fri, May 20, 2016 at 09:38:39AM +0000, Kuninori Morimoto wrote:
> 
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> simple-card.h includes soc.h, and soc.h includes soc-dai.h
> Let's remove these header.

It's not automatically good to remove headers, one common reason for
build breaks is that a file will rely on some header including another
header for an API it uses but then the header will change and the C file
will stop building.  It's better to directly include any headers that
are being used to avoid issues like this.
Kuninori Morimoto May 30, 2016, 11:53 p.m. UTC | #2
Hi Mark

> > simple-card.h includes soc.h, and soc.h includes soc-dai.h
> > Let's remove these header.
> 
> It's not automatically good to remove headers, one common reason for
> build breaks is that a file will rely on some header including another
> header for an API it uses but then the header will change and the C file
> will stop building.  It's better to directly include any headers that
> are being used to avoid issues like this.

OK, fair enough.
Please drop this (and [02/49] ?) patch

Patch
diff mbox

diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index 2389ab4..a542b71 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -18,8 +18,6 @@ 
 #include <linux/string.h>
 #include <sound/jack.h>
 #include <sound/simple_card.h>
-#include <sound/soc-dai.h>
-#include <sound/soc.h>
 
 struct simple_card_data {
 	struct snd_soc_card snd_card;