* [PATCH] acpi: Fix the build when the video output switcher is disabled
@ 2010-10-28 19:06 jwjstone
2010-11-30 23:29 ` [PATCH] ACPI: video: fix build error when VIDEO_OUTPUT_CONTROL=n Len Brown
0 siblings, 1 reply; 2+ messages in thread
From: jwjstone @ 2010-10-28 19:06 UTC (permalink / raw)
To: linux-kernel, linux-acpi, lenb, rui.zhang; +Cc: Jack Stone
From: Jack Stone <jwjstone@fastmail.fm>
When CONFIG_ACPI_VIDEO is enabled and CONFIG_VIDEO_OUTPUT_CONTROL is disabled
the following errors occur:
drivers/built-in.o: In function `acpi_video_bus_put_one_device':
/home/jwjs/projects/linux.trees.git/drivers/acpi/video.c:1455: undefined reference to `video_output_unregister'
drivers/built-in.o: In function `acpi_video_device_find_cap':
/home/jwjs/projects/linux.trees.git/drivers/acpi/video.c:917: undefined reference to `video_output_register'
Fix this by adding ifdefs around the offending calls in acpi video.
Signed-off-by: Jack Stone <jwjstone@fastmail.fm>
---
drivers/acpi/video.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 5cd0228..a3ec29e 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -905,6 +905,7 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
}
+#ifdef CONFIG_VIDEO_OUTPUT_CONTROL
if (acpi_video_display_switch_support()) {
if (device->cap._DCS && device->cap._DSS) {
@@ -919,6 +920,7 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
kfree(name);
}
}
+#endif
}
/*
@@ -1452,7 +1454,9 @@ static int acpi_video_bus_put_one_device(struct acpi_video_device *device)
thermal_cooling_device_unregister(device->cooling_dev);
device->cooling_dev = NULL;
}
+#ifdef CONFIG_VIDEO_OUTPUT_CONTROL
video_output_unregister(device->output_dev);
+#endif
return 0;
}
--
1.7.3.2.145.g7ebee
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] ACPI: video: fix build error when VIDEO_OUTPUT_CONTROL=n
2010-10-28 19:06 [PATCH] acpi: Fix the build when the video output switcher is disabled jwjstone
@ 2010-11-30 23:29 ` Len Brown
0 siblings, 0 replies; 2+ messages in thread
From: Len Brown @ 2010-11-30 23:29 UTC (permalink / raw)
To: Jack Stone; +Cc: linux-kernel, linux-acpi, rui.zhang
From: Len Brown <len.brown@intel.com>
drivers/built-in.o: In function `acpi_video_bus_put_devices':
video.c:(.text+0x79663): undefined reference to
`video_output_unregister'
drivers/built-in.o: In function `acpi_video_bus_add':
video.c:(.text+0x7b0b3): undefined reference to `video_output_register'
Signed-off-by: Len Brown <len.brown@intel.com>
---
include/linux/video_output.h | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/include/linux/video_output.h b/include/linux/video_output.h
index 2fb46bc..c630194 100644
--- a/include/linux/video_output.h
+++ b/include/linux/video_output.h
@@ -34,9 +34,23 @@ struct output_device {
struct device dev;
};
#define to_output_device(obj) container_of(obj, struct output_device, dev)
+#ifdef CONFIG_VIDEO_OUTPUT_CONTROL
struct output_device *video_output_register(const char *name,
struct device *dev,
void *devdata,
struct output_properties *op);
void video_output_unregister(struct output_device *dev);
+#else
+static struct output_device *video_output_register(const char *name,
+ struct device *dev,
+ void *devdata,
+ struct output_properties *op)
+{
+ return ERR_PTR(-ENODEV);
+}
+static void video_output_unregister(struct output_device *dev)
+{
+ return;
+};
+#endif
#endif
--
1.7.3.2.343.g7d43d
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-11-30 23:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-28 19:06 [PATCH] acpi: Fix the build when the video output switcher is disabled jwjstone
2010-11-30 23:29 ` [PATCH] ACPI: video: fix build error when VIDEO_OUTPUT_CONTROL=n Len Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.