Skip to contentSkip to conversation

ALSA: Add missing include of pcm.h to pcm_params.h

PATCH In review Mark Brown 2 participants 4 messages Jun 19, 2012 – Jun 20, 2012 Sound

lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 ALSA: Add missing include of pcm.h to pcm_params.h

There's a dependency but no #include.

---
 include/sound/pcm_params.h |    2 ++
 1 file changed, 2 insertions(+)
include/sound/pcm_params.h +2 -0
index f494f1e..37ae12e 100644
@@ -22,6 +22,8 @@
  *
  */
 
+#include <sound/pcm.h>
+
 int snd_pcm_hw_param_first(struct snd_pcm_substream *pcm, 
 			   struct snd_pcm_hw_params *params,
 			   snd_pcm_hw_param_t var, int *dir);
Signature · 1 line
1.7.10
#1 lore raw

At Tue, 19 Jun 2012 19:31:48 +0100,

Quoted 2 lines · Mark Brown

There's a dependency but no #include.

I don't mind to put it, but it wasn't done because we didn't want to let the driver code including only pcm_params.h without pcm.h.

Takashi

Quoted 22 lines
---
 include/sound/pcm_params.h |    2 ++
 1 file changed, 2 insertions(+)
include/sound/pcm_params.h +2 -0
index f494f1e..37ae12e 100644
@@ -22,6 +22,8 @@
  *
  */
 
+#include <sound/pcm.h>
+
 int snd_pcm_hw_param_first(struct snd_pcm_substream *pcm, 
 			   struct snd_pcm_hw_params *params,
 			   snd_pcm_hw_param_t var, int *dir);
Signature · 1 line
1.7.10
author
#2 lore raw
Quoted 6 lines · Takashi Iwai
Quoted 1 line · Mark Brown

There's a dependency but no #include.

I don't mind to put it, but it wasn't done because we didn't want to let the driver code including only pcm_params.h without pcm.h.

I noticed it because I was writing some library code which only directly referenced things in pcm_params.h so just included that directly. The general idea is that headers shouldn't have external dependencies...

#3 lore raw

At Wed, 20 Jun 2012 10:34:25 +0100,

Quoted 4 lines · Mark Brown
Quoted 1 line · Takashi Iwai

Mark Brown wrote:

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

There's a dependency but no #include.

I don't mind to put it, but it wasn't done because we didn't want to let the driver code including only pcm_params.h without pcm.h.

I noticed it because I was writing some library code which only directly referenced things in pcm_params.h so just included that directly. The general idea is that headers shouldn't have external dependencies...

True.

This can be an endless bikeshed discussion, so I simply applied the patch now.

thanks,

Takashi