vgaarb: make client interface config invariant.
authorIngo Molnar <mingo@elte.hu>
Tue, 22 Sep 2009 23:52:18 +0000 (09:52 +1000)
committerDave Airlie <airlied@linux.ie>
Tue, 22 Sep 2009 23:52:18 +0000 (09:52 +1000)
Fixes build when VGA_ARB is off.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Dave Airlie <airlied@redhat.com>
include/linux/vgaarb.h

index e81c64af80c12095b6ba076a2340ff448f4eed62..923f9040ea203568649e18faa245c1adf83f2dd8 100644 (file)
@@ -41,7 +41,7 @@
  *     interrupts at any time.
  */
 extern void vga_set_legacy_decoding(struct pci_dev *pdev,
-                                                                       unsigned int decodes);
+                                   unsigned int decodes);
 
 /**
  *     vga_get         - acquire & locks VGA resources
@@ -193,8 +193,17 @@ static inline int vga_conflicts(struct pci_dev *p1, struct pci_dev *p2)
  * They driver will get a callback when VGA arbitration is first used
  * by userspace since we some older X servers have issues.
  */
+#if defined(CONFIG_VGA_ARB)
 int vga_client_register(struct pci_dev *pdev, void *cookie,
                        void (*irq_set_state)(void *cookie, bool state),
                        unsigned int (*set_vga_decode)(void *cookie, bool state));
+#else
+static inline int vga_client_register(struct pci_dev *pdev, void *cookie,
+                                     void (*irq_set_state)(void *cookie, bool state),
+                                     unsigned int (*set_vga_decode)(void *cookie, bool state))
+{
+       return 0;
+}
+#endif
 
 #endif /* LINUX_VGA_H */