mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sound: soc-acpi: fix implicit header use of module.h/export.h
@ 2019-04-13 15:15 Paul Gortmaker
  2019-05-08  9:01 ` Applied "sound: soc-acpi: fix implicit header use of module.h/export.h" to the asoc tree Mark Brown
  2019-05-08  9:07 ` [PATCH] sound: soc-acpi: fix implicit header use of module.h/export.h Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Paul Gortmaker @ 2019-04-13 15:15 UTC (permalink / raw)
  To: linux-kernel
  Cc: Paul Gortmaker, Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai

This file is implicitly relying on an instance of including
module.h from <linux/acpi.h>.

Ideally, header files under include/linux shouldn't be adding
includes of other headers, in anticipation of their consumers,
but just the headers needed for the header itself to pass
parsing with CPP.

The module.h is particularly bad in this sense, as it itself does
include a whole bunch of other headers, due to the complexity of
module support.

Here, we make the include explicit, in order to allow the future
removal of module.h from linux/acpi.h without causing build breakage.

Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

diff --git a/sound/soc/soc-acpi.c b/sound/soc/soc-acpi.c
index 4fb29f0e561e..444ce0602f76 100644
--- a/sound/soc/soc-acpi.c
+++ b/sound/soc/soc-acpi.c
@@ -4,6 +4,8 @@
 //
 // Copyright (c) 2013-15, Intel Corporation.
 
+#include <linux/export.h>
+#include <linux/module.h>
 #include <sound/soc-acpi.h>
 
 struct snd_soc_acpi_mach *
-- 
2.11.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-05-08  9:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-13 15:15 [PATCH] sound: soc-acpi: fix implicit header use of module.h/export.h Paul Gortmaker
2019-05-08  9:01 ` Applied "sound: soc-acpi: fix implicit header use of module.h/export.h" to the asoc tree Mark Brown
2019-05-08  9:07 ` [PATCH] sound: soc-acpi: fix implicit header use of module.h/export.h Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®