acpi: Fix the build when the video output switcher is disabled
PATCH 1/1 acpi: Fix the build when the video output switcher is disabled
From: Jack Stone <[email protected]>
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.
--- drivers/acpi/video.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/acpi/video.c +4 -0
@@ -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 ; }
Signature · 1 line
1.7.3.2.145.g7ebee
Len Brown
reviewerPATCH 1/1 ACPI: video: fix build error when VIDEO_OUTPUT_CONTROL=n
From: Len Brown <[email protected]>
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'
--- include/linux/video_output.h | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-)
include/linux/video_output.h +14 -0
@@ -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
Signature · 1 line
1.7.3.2.343.g7d43d