Stratos Psomadakis
2011-Jun-22 13:25 UTC
[Nouveau] [PATCH] drm/nouveau: Fix build error in nouveau_acpi.c
From: Stratos Psomadakis <psomas at cslab.ece.ntua.gr> Fix compilation failure when CONFIG_ACPI=y, but CONFIG_ACPI_VIDEO is not selected by Kconfig (ie CONFIG_ACPI_VIDEO=m|n) When CONFIG_ACPI_VIDEO != y, nouveau_acpi_edid will fail to build, due to the call to the 'acpi_video_get_edid' function. Signed-off-by: Stratos Psomadakis <psomas at cslab.ece.ntua.gr> --- drivers/gpu/drm/nouveau/nouveau_drv.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index 9c56331..23c6540 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h @@ -973,8 +973,12 @@ void nouveau_register_dsm_handler(void); void nouveau_unregister_dsm_handler(void); int nouveau_acpi_get_bios_chunk(uint8_t *bios, int offset, int len); bool nouveau_acpi_rom_supported(struct pci_dev *pdev); +#if defined(CONFIG_ACPI_VIDEO) int nouveau_acpi_edid(struct drm_device *, struct drm_connector *); #else +static inline int nouveau_acpi_edid(struct drm_device *dev, struct drm_connector *connector) { return -EINVAL; } +#endif +#else static inline void nouveau_register_dsm_handler(void) {} static inline void nouveau_unregister_dsm_handler(void) {} static inline bool nouveau_acpi_rom_supported(struct pci_dev *pdev) { return false; } -- 1.7.5.4