diff options
| author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-08-19 16:29:43 -0400 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2010-08-26 19:10:44 -0400 |
| commit | 04cbe1de6fbda9649a6f25666194e6955d3e717e (patch) | |
| tree | cfa16f6b8319bfef9db8a5e9ada9ab030644a55e /include | |
| parent | 30f4437202daa5315a1033b2084ddce96fea99b6 (diff) | |
vgaarb: Wrap vga_(get|put) in CONFIG_VGA_ARB
Fix link failure without the vga arbitrator.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/vgaarb.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/include/linux/vgaarb.h b/include/linux/vgaarb.h index 6228b5b77d35..e9e1524b582c 100644 --- a/include/linux/vgaarb.h +++ b/include/linux/vgaarb.h | |||
| @@ -93,8 +93,11 @@ extern void vga_set_legacy_decoding(struct pci_dev *pdev, | |||
| 93 | * Nested calls are supported (a per-resource counter is maintained) | 93 | * Nested calls are supported (a per-resource counter is maintained) |
| 94 | */ | 94 | */ |
| 95 | 95 | ||
| 96 | extern int vga_get(struct pci_dev *pdev, unsigned int rsrc, | 96 | #if defined(CONFIG_VGA_ARB) |
| 97 | int interruptible); | 97 | extern int vga_get(struct pci_dev *pdev, unsigned int rsrc, int interruptible); |
| 98 | #else | ||
| 99 | static inline int vga_get(struct pci_dev *pdev, unsigned int rsrc, int interruptible) { return 0; } | ||
| 100 | #endif | ||
| 98 | 101 | ||
| 99 | /** | 102 | /** |
| 100 | * vga_get_interruptible | 103 | * vga_get_interruptible |
| @@ -131,7 +134,11 @@ static inline int vga_get_uninterruptible(struct pci_dev *pdev, | |||
| 131 | * 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 |
| 132 | */ | 135 | */ |
| 133 | 136 | ||
| 137 | #if defined(CONFIG_VGA_ARB) | ||
| 134 | extern int vga_tryget(struct pci_dev *pdev, unsigned int rsrc); | 138 | extern int vga_tryget(struct pci_dev *pdev, unsigned int rsrc); |
| 139 | #else | ||
| 140 | static inline int vga_tryget(struct pci_dev *pdev, unsigned int rsrc) { return 0; } | ||
| 141 | #endif | ||
| 135 | 142 | ||
| 136 | /** | 143 | /** |
| 137 | * vga_put - release lock on legacy VGA resources | 144 | * vga_put - release lock on legacy VGA resources |
| @@ -146,7 +153,11 @@ extern int vga_tryget(struct pci_dev *pdev, unsigned int rsrc); | |||
| 146 | * released if the counter reaches 0. | 153 | * released if the counter reaches 0. |
| 147 | */ | 154 | */ |
| 148 | 155 | ||
| 156 | #if defined(CONFIG_VGA_ARB) | ||
| 149 | extern void vga_put(struct pci_dev *pdev, unsigned int rsrc); | 157 | extern void vga_put(struct pci_dev *pdev, unsigned int rsrc); |
| 158 | #else | ||
| 159 | #define vga_put(pdev, rsrc) | ||
| 160 | #endif | ||
| 150 | 161 | ||
| 151 | 162 | ||
| 152 | /** | 163 | /** |
