public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ACPI: Fix <acpi/video.h> when CONFIG_ACPI_VIDEO=n
@ 2010-11-19 16:02 Jean Delvare
  2010-11-19 16:36 ` Randy Dunlap
  2010-11-20  1:14 ` Guenter Roeck
  0 siblings, 2 replies; 3+ messages in thread
From: Jean Delvare @ 2010-11-19 16:02 UTC (permalink / raw)
  To: Len Brown; +Cc: linux-acpi

Building the kernel (2.6.37-rc2-git5) with CONFIG_ACPI_VIDEO=n fails
for me because of these errors:

include/acpi/video.h:22:11: warning: "struct acpi_device" declared inside parameter list
include/acpi/video.h:22:11: warning: its scope is only this definition or declaration, which is probably not what you want
include/acpi/video.h: In function "acpi_video_get_edid":
include/acpi/video.h:24:10: error: "ENODEV" undeclared (first use in this function)
include/acpi/video.h:24:10: note: each undeclared identifier is reported only once for each function it appears in

Adding the missing include and structure declaration fixes it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
---
 include/acpi/video.h |    4 ++++
 1 file changed, 4 insertions(+)

--- linux-2.6.37-rc2.orig/include/acpi/video.h	2010-11-19 14:56:45.000000000 +0100
+++ linux-2.6.37-rc2/include/acpi/video.h	2010-11-19 15:00:23.000000000 +0100
@@ -1,6 +1,8 @@
 #ifndef __ACPI_VIDEO_H
 #define __ACPI_VIDEO_H
 
+#include <linux/errno.h>
+
 #define ACPI_VIDEO_DISPLAY_CRT  1
 #define ACPI_VIDEO_DISPLAY_TV   2
 #define ACPI_VIDEO_DISPLAY_DVI  3
@@ -10,6 +12,8 @@
 #define ACPI_VIDEO_DISPLAY_LEGACY_PANEL   0x0110
 #define ACPI_VIDEO_DISPLAY_LEGACY_TV      0x0200
 
+struct acpi_device;
+
 #if (defined CONFIG_ACPI_VIDEO || defined CONFIG_ACPI_VIDEO_MODULE)
 extern int acpi_video_register(void);
 extern void acpi_video_unregister(void);


-- 
Jean Delvare

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

end of thread, other threads:[~2010-11-20  1:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-19 16:02 [PATCH] ACPI: Fix <acpi/video.h> when CONFIG_ACPI_VIDEO=n Jean Delvare
2010-11-19 16:36 ` Randy Dunlap
2010-11-20  1:14 ` Guenter Roeck

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