From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Williamson Subject: [PATCH v2 1/6] vgaarb: Stub vga_set_legacy_decoding() Date: Wed, 18 Mar 2015 14:13:12 -0600 Message-ID: <20150318201312.24807.70196.stgit@gimli.home> References: <20150318200053.24807.74115.stgit@gimli.home> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: linux-pci@vger.kernel.org, bsd@redhat.com, linux-kernel@vger.kernel.org To: alex.williamson@redhat.com, kvm@vger.kernel.org Return-path: In-Reply-To: <20150318200053.24807.74115.stgit@gimli.home> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org vga_set_legacy_decoding() is defined in drivers/gpu/vga/vgaarb.c, which is only compiled with CONFIG_VGA_ARB. A caller would therefore get an undefined symbol if the VGA arbiter is not enabled. Signed-off-by: Alex Williamson Acked-by: Dave Airlie --- include/linux/vgaarb.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/vgaarb.h b/include/linux/vgaarb.h index c37bd4d..8c3b412 100644 --- a/include/linux/vgaarb.h +++ b/include/linux/vgaarb.h @@ -65,8 +65,13 @@ struct pci_dev; * out of the arbitration process (and can be safe to take * interrupts at any time. */ +#if defined(CONFIG_VGA_ARB) extern void vga_set_legacy_decoding(struct pci_dev *pdev, unsigned int decodes); +#else +static inline void vga_set_legacy_decoding(struct pci_dev *pdev, + unsigned int decodes) { }; +#endif /** * vga_get - acquire & locks VGA resources