Skip to contentSkip to conversation

nouveau: fix undefined reference to acpi_lid_open

PATCH In review Daniel Mack 2 participants 2 messages Feb 17, 2010

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

PATCH 1/1 nouveau: fix undefined reference to acpi_lid_open

Fix the following compile time error:

drivers/built-in.o: In function `nouveau_connector_detect':
/home/daniel/src/linux/jup/linux-2.6/drivers/gpu/drm/nouveau/nouveau_connector.c:243: undefined reference to `acpi_lid_open'

Cc David Airlie <[email protected]>
Cc Ben Skeggs <[email protected]>
Cc Francisco Jerez <[email protected]>
Cc Maarten Maathuis <[email protected]>
Cc Xavier Chantry <[email protected]>
Cc Marcin Slusarz <[email protected]>
---
 drivers/gpu/drm/nouveau/nouveau_connector.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpu/drm/nouveau/nouveau_connector.c +1 -1
index d2f6335..c74d45d 100644
@@ -239,7 +239,7 @@ nouveau_connector_detect(struct drm_connector *connector)
 	if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)
 		nv_encoder = find_encoder_by_type(connector, OUTPUT_LVDS);
 	if (nv_encoder && nv_connector->native_mode) {
-#ifdef CONFIG_ACPI
+#ifdef CONFIG_ACPI_BUTTON
 		if (!nouveau_ignorelid && !acpi_lid_open())
 			return connector_status_disconnected;
 #endif
Signature · 1 line
1.6.5.2
#1 lore raw
Quoted 23 lines · Daniel Mack

Fix the following compile time error:

drivers/built-in.o: In function `nouveau_connector_detect':
/home/daniel/src/linux/jup/linux-2.6/drivers/gpu/drm/nouveau/nouveau_connector.c:243: undefined reference to `acpi_lid_open'

Cc David Airlie <[email protected]>
Cc Ben Skeggs <[email protected]>
Cc Francisco Jerez <[email protected]>
Cc Maarten Maathuis <[email protected]>
Cc Xavier Chantry <[email protected]>
Cc Marcin Slusarz <[email protected]>
---
 drivers/gpu/drm/nouveau/nouveau_connector.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpu/drm/nouveau/nouveau_connector.c +0 -0
index d2f6335..c74d45d 100644

drivers/gpu/drm/nouveau/nouveau_connector.c nouveau_connector_detect(struct drm_connector *connector) · line 245

Quoted 8 lines
drivers/gpu/drm/nouveau/nouveau_connector.c +1 -1
@@ -239,7 +239,7 @@ nouveau_connector_detect(struct drm_connector *connector)
 	if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)
 		nv_encoder = find_encoder_by_type(connector, OUTPUT_LVDS);
 	if (nv_encoder && nv_connector->native_mode) {
-#ifdef CONFIG_ACPI
+#ifdef CONFIG_ACPI_BUTTON
 		if (!nouveau_ignorelid && !acpi_lid_open())
 			return connector_status_disconnected;
 #endif

You are fixing CONFIG_ACPI_BUTTON=m vs CONFIG_DRM_NOUVEAU=y compilation, but breaking runtime behaviour of CONFIG_ACPI_BUTTON=m + CONFIG_DRM_NOUVEAU=m.

I think this code should be compiled when:
#if defined(CONFIG_ACPI_BUTTON) || (defined(CONFIG_ACPI_BUTTON_MODULE) && defined(CONFIG_DRM_NOUVEAU_MODULE))

Marcin