diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-08-19 22:29:43 +0200 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-08-27 01:10:44 +0200 |
commit | 04cbe1de6fbda9649a6f25666194e6955d3e717e (patch) | |
tree | cfa16f6b8319bfef9db8a5e9ada9ab030644a55e /include | |
parent | drm/radeon/kms: add missing scratch update in dp_detect (diff) | |
download | linux-04cbe1de6fbda9649a6f25666194e6955d3e717e.tar.xz linux-04cbe1de6fbda9649a6f25666194e6955d3e717e.zip |
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, * Nested calls are supported (a per-resource counter is maintained) */ -extern int vga_get(struct pci_dev *pdev, unsigned int rsrc, - int interruptible); +#if defined(CONFIG_VGA_ARB) +extern int vga_get(struct pci_dev *pdev, unsigned int rsrc, int interruptible); +#else +static inline int vga_get(struct pci_dev *pdev, unsigned int rsrc, int interruptible) { return 0; } +#endif /** * vga_get_interruptible @@ -131,7 +134,11 @@ static inline int vga_get_uninterruptible(struct pci_dev *pdev, * are already locked by another card. It can be called in any context */ +#if defined(CONFIG_VGA_ARB) extern int vga_tryget(struct pci_dev *pdev, unsigned int rsrc); +#else +static inline int vga_tryget(struct pci_dev *pdev, unsigned int rsrc) { return 0; } +#endif /** * vga_put - release lock on legacy VGA resources @@ -146,7 +153,11 @@ extern int vga_tryget(struct pci_dev *pdev, unsigned int rsrc); * released if the counter reaches 0. */ +#if defined(CONFIG_VGA_ARB) extern void vga_put(struct pci_dev *pdev, unsigned int rsrc); +#else +#define vga_put(pdev, rsrc) +#endif /** |