mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: jwjstone@fastmail.fm
To: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
	lenb@kernel.org, rui.zhang@intel.com
Cc: Jack Stone <jwjstone@fastmail.fm>
Subject: [PATCH] acpi: Fix the build when the video output switcher is disabled
Date: Thu, 28 Oct 2010 20:06:18 +0100	[thread overview]
Message-ID: <1288292779-23347-1-git-send-email-jwjstone@fastmail.fm> (raw)

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


             reply	other threads:[~2010-10-28 19:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-28 19:06 jwjstone [this message]
2010-11-30 23:29 ` [PATCH] ACPI: video: fix build error when VIDEO_OUTPUT_CONTROL=n Len Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1288292779-23347-1-git-send-email-jwjstone@fastmail.fm \
    --to=jwjstone@fastmail.fm \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®