Skip to contentSkip to conversation

ACPI: Fix <acpi/video.h> when CONFIG_ACPI_VIDEO=n

PATCH In review Jean Delvare 3 participants 3 messages Nov 19, 2010 – Nov 20, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI: Fix <acpi/video.h> when CONFIG_ACPI_VIDEO=n

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.

---
 include/acpi/video.h |    4 ++++
 1 file changed, 4 insertions(+)
include/acpi/video.h +4 -0
@@ -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);
Signature · 1 line
Jean Delvare
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · On Fri, 19 Nov 2010 17:02:00 +0100 Jean Delvare wrote:

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

Quoted 3 lines

Adding the missing include and structure declaration fixes it.

This is the third patch like this. Please apply one of them.

Quoted 27 lines
---
 include/acpi/video.h |    4 ++++
 1 file changed, 4 insertions(+)
include/acpi/video.h +4 -0
@@ -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);
Signature · 1 line
-- 

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

Acked-by on v1 1/1
#2 lore raw
In reply to Jean Delvare
Quoted 9 lines · Jean Delvare

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

Quoted 4 lines

Adding the missing include and structure declaration fixes it.

Yes, it would be great if someone would apply one of the patches. Build fails for me with CONFIG_PM=n.

Guenter