aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/vgaarb.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/vgaarb.h')
-rw-r--r--include/linux/vgaarb.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/include/linux/vgaarb.h b/include/linux/vgaarb.h
index 814f294d4cd0..e9e1524b582c 100644
--- a/include/linux/vgaarb.h
+++ b/include/linux/vgaarb.h
@@ -31,7 +31,6 @@
31#ifndef LINUX_VGA_H 31#ifndef LINUX_VGA_H
32#define LINUX_VGA_H 32#define LINUX_VGA_H
33 33
34#include <asm/vga.h>
35 34
36/* Legacy VGA regions */ 35/* Legacy VGA regions */
37#define VGA_RSRC_NONE 0x00 36#define VGA_RSRC_NONE 0x00
@@ -94,8 +93,11 @@ extern void vga_set_legacy_decoding(struct pci_dev *pdev,
94 * Nested calls are supported (a per-resource counter is maintained) 93 * Nested calls are supported (a per-resource counter is maintained)
95 */ 94 */
96 95
97extern int vga_get(struct pci_dev *pdev, unsigned int rsrc, 96#if defined(CONFIG_VGA_ARB)
98 int interruptible); 97extern int vga_get(struct pci_dev *pdev, unsigned int rsrc, int interruptible);
98#else
99static inline int vga_get(struct pci_dev *pdev, unsigned int rsrc, int interruptible) { return 0; }
100#endif
99 101
100/** 102/**
101 * vga_get_interruptible 103 * vga_get_interruptible
@@ -132,7 +134,11 @@ static inline int vga_get_uninterruptible(struct pci_dev *pdev,
132 * are already locked by another card. It can be called in any context 134 * are already locked by another card. It can be called in any context
133 */ 135 */
134 136
137#if defined(CONFIG_VGA_ARB)
135extern int vga_tryget(struct pci_dev *pdev, unsigned int rsrc); 138extern int vga_tryget(struct pci_dev *pdev, unsigned int rsrc);
139#else
140static inline int vga_tryget(struct pci_dev *pdev, unsigned int rsrc) { return 0; }
141#endif
136 142
137/** 143/**
138 * vga_put - release lock on legacy VGA resources 144 * vga_put - release lock on legacy VGA resources
@@ -147,7 +153,11 @@ extern int vga_tryget(struct pci_dev *pdev, unsigned int rsrc);
147 * released if the counter reaches 0. 153 * released if the counter reaches 0.
148 */ 154 */
149 155
156#if defined(CONFIG_VGA_ARB)
150extern void vga_put(struct pci_dev *pdev, unsigned int rsrc); 157extern void vga_put(struct pci_dev *pdev, unsigned int rsrc);
158#else
159#define vga_put(pdev, rsrc)
160#endif
151 161
152 162
153/** 163/**